Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Modifying the parameters of methods with arbitrarysignatures

You will want to use thisJoinPoint.getArgs() to get the array of any number
of arguments at the current join point. See the AspectJ user guide (or a
good book like AspectJ in Action or Eclipse AspectJ) for more details.

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Chris Rose
Sent: Wednesday, October 31, 2007 1:40 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Modifying the parameters of methods with
arbitrarysignatures

I want to use aspectj to provide a generic interceptor framework where 
we can plug in code at any point to modify input parameters to our methods.

Ideally, what I want is something like this, but I'm not sure how to 
accomplish it in aspectj (this uses a bastardization of the Java5 
varargs syntax, below, for illustrative purposes).

around(Object... args): methodPointCut(args(args)) {
     newArgs = invokeHook (args);
     proceed(newArgs);
}

Is there any way to do this without needing to enumerate the parameters 
in the aspect?

-- 
Chris Rose
Developer    Planet Consulting Group
(780) 577-8433
crose@xxxxxxxxxxxx
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top