Re: [aspectwerkz-user] getting all methods args

Alexandre Vasseur <[email protected]>
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
simply use "JoinPoint jp" as argument to your advice (no matter
before, after around advice). This argument is implicitly bounded, and
can be use when you are already using args() as well.

Then use jp.getRtti() and convert it to an appropriate Rtti subtype
(MethodRtti f.e.) to invoke getParameterValues() that will give you an
Object[]

See sample:
http://cvs.aspectwerkz.codehaus.org/viewrep/aspectwerkz/aspectwerkz4/src/samples/examples/caching/CachingAspect.java?r=1.3


Alex


On 5/4/05, Markus Kohler <[email protected]> wrote:
> Hi,
> Is it possible to get *all* args of an intercepted method ?
> The documentaion seems to say that the parameters have to be specified
> for the  args () pointcut designator.
> What I would like to do, is just get all parameters in an untyped
> Array or List,
> comparable to what a dynamic proxy in Java offers.
> 
> Is there any way to achieve this in aspectwerkz 2.0 ?
> 
> Regards,
> Markus
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.