Hi All,

 I am currently working of a project which involves applying  bytecode 
manipulation  via Javassist to a set of annotation-marked methods.  

We do so by traversing & loading all relevant classes,
going through all of its methods and use reflection to
 examine their annotation list, i.e.:

    Class clazz = Class.forName(..);
    Method[] methodList = clazz.getMethods();
    for each method {
           Annotation[] annotationList = method.getAnnotations()                
           
          // and look for my own marker annotation here
   }

        
 I have recently read a post by Bill Burke which leads
 me to believe that there might be a more efficient
 way of achieving my task:

 "I have to iterate through all classes in the jar to see if they are 
annotated. I do this through Javassist (so the classes don't have to be loaded. 
)"

 Can I, and how can I, use JavAssist to check class's
 annotation list without loading it?


Thanks in advance,

Gilad Haimov

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873182#3873182

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873182


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to