[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Why annotations are not exposed through JoinPoint.StaticPart?

Annotations can be really useful in guiding advices, on the other hand
reflection is expensive.

AspectJ could expose not the annotations, but respective shadow classes. For
instance, for any affected annotation MyAnnotation, AspectJ could create a
shadow normal Java class, like MyAnnotationShadow, which would have the same
fields as the respective annotation (all public). This is a compile time
work.

Then, the static constructor could initialize these shadow classes, instead
of real annotations - which should be cheap.

Since AspectJ integrates with IDE, the user code will be able to make
references to these shadow classes.

Is this a feasible solution?

--
View this message in context: http://aspectj.2085585.n4.nabble.com/Why-annotations-are-not-exposed-through-JoinPoint-StaticPart-tp4196637p4199089.html
Sent from the AspectJ - users mailing list archive at Nabble.com.