JBoss Community

How to get inner class name with annotation by ClassFile ?

created by Maciej Madajczyk in Javassist - View the full discussion

Hi

I have simple class with annotated inner classes:

 

public class Main {

 

     @MyAnnotation

     private static final class A{

   

     }

 

     @MyAnnotation

     private static final class B{

  

     }

 

     private static final class C{

 

     }

 

}

 

The only thing I have is binary data of Main class, so I create ClassFile.

 

How can I get all inner class names exist in Main class with annotation @MyAnnotation from this classFile ? (in this case name for class A and B)

 

Best regards

maciejmad

Reply to this message by going to Community

Start a new discussion in Javassist at Community