When classes with annotation get loaded via URLClassLoader
, java reflection mechanism can't see the annotations not in the classpath (They loaded from outside JVM's classpath).
However, e.g. calling MyLoadedClass.class.getAnnotaions()
shows them.
In particular, I've been trying to scan via reflection annotated classes under a java package but nothing is found.
How to make such a scan via java reflection work?
Aucun commentaire:
Enregistrer un commentaire