Runtime annotation retention of classes in pax-exam itests

9 views
Skip to first unread message

thrau

unread,
Jun 21, 2014, 2:09:21 PM6/21/14
to openen...@googlegroups.com
I have a case where a component is introspecting classes, namely looking for fields with @OpenEngSBModelId, at runtime.

In a pax-exam itest, I use the TestModel classes via TestModelDecorator. The class is effectively retrieved via modelDecorator.getModel().getClass(). Once in the introspection routine of the bundle, all annotations are gone from the class, methods and fields. I can get methods and fields via reflection from the class, but they have no annotations.
I'm assuming that this has something to do with pax-exam, the test scope and the class loading mechanisms, but I don't understand how this can affect only annotations.

Any ideas?

BR,
Thomas

Reply all
Reply to author
Forward
0 new messages