[jboss-cvs] Re: jboss-cvs-commits Digest, Vol 33, Issue 370
Kabir Khan
kabir.khan at jboss.com
Thu Mar 19 08:19:22 EDT 2009
On 19 Mar 2009, at 12:48, Ales Justin wrote:
>>>> Last I looked, the AnnotationEnvironment ends up loading the
>>>> classes, so it is no use to AOP. We need all the metadata before
>>>> any clases are loaded
>>>
>>> It only loads annotations.
>>> Which should be fine for AOP.
>> https://svn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/annotations/AnnotationEnvironment.java
>> Apart from
>> boolean hasClassAnnotatedWith(String annotationName);
>> all the methods seem to load up classes, e.g.
>> Set<Element<Annotation, Class<?>>> classIsAnnotatedWith(String
>> annotationName);
>> Set<Element<Annotation, Field>> classHasFieldAnnotatedWith(String
>> annotationName);
>> So if something is annotated with the annotations, it seems to load
>> up the Field, Method, Constructor & Class that has been annotated?
>
> Where?
>
> Not until you really need it,
> that's why there is an Element class there,
> which has the lazy notion.
I did not realise that :-) I still think there might be some problems
though. Since I am away, Ståle can you have a look at
AspectAnnotationLoader vs what is provided by AnnotationEnvironment?
More information about the jboss-cvs-commits
mailing list