jeudi 9 août 2018

Java Reflection in Spring boot Web Context

I Am generating dynamic class using asm and javassist ... I can now load the class in the class loader and retrieve the annotation list . But when i try to check if the annotation is present it returns false

Example :
Arrays.asList(oClass.getDeclaredAnnotations()).forEach(System.out::println); This snippet returns the annotations list @*****.*****.MyAnnotation

oClass.isAnnotationPresent(MyAnnotation.class) returns false .





Aucun commentaire:

Enregistrer un commentaire