Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Access to annotation values through reflection

There is no magic in AspectJ, so yes you can reach the same things
through regular reflection on Java5.  As policed by AspectJ, the
annotations needs runtime retention to be accessible through
reflection when the code is executing.

Andy.

On 22/06/06, Jon S. Baekken <jbaekken@xxxxxxxxxxxx> wrote:
Dear list,

As I understand it, all context that can be exposed via a pointcut,
could just as well be accessed via the reflective API (i.e.
thisJoinPoint etc). Is this equally true for annotations and
annotation values using @this, @target, @annotation etc? I suppose
you can get some of it using e.g.

thisJoinPoint.getClass().getAnnotations();

But is there also things one cannot get?

Thanks a lot,
Jon
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top