Skip to main content

[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?

On a quick read through, sounds feasible.  Right now for critical
performance we offer direct annotation value binding which entirely
skips annotations at runtime.  Perhaps you haven't seen it but it
enables you to bind the values of the annotation in the pointcut,
rather than the annotation itself:

http://andrewclement.blogspot.com/2009/02/aspectj-optimized-annotation-value.html

would that feature meet your needs or do you really need the annotation itself?

cheers,
Andy

On 15 December 2011 00:29, Mark <mark.kharitonov@xxxxxxxxx> wrote:
> 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.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top