Hi,

I have some custom annotations with retention == runtime.
Now, when I use these annotations on an object that is also annotated as iPOJO 
component, I cannot access my annotations anymore on a created instance of the 
component.
If I list the annotations on such annotated field, I get something like 
$Proxy17 as class instead of my custom annotation class.

This how I try to get to the annotations:

(simplified example:)

my iPOJO with custom annotation:

@Component
@Provides
public class DeviceService{
    
    @Channel(payload = DeviceBean.class, type= VOLUME_STATE_CHANGED) // <= 
custom annotation
    EventLogger volumeStateChanged;

...

When I get hold of the component instance, I get to the original(manipulated) 
object like this:
Object instancePojo = ((InstanceManager) instance).getPojoObject();
Then I get the field volumeStateChanged and try to get the @Channel annotation.
Which fails => field.getAnnotation(Channel.class) == null


Is there a way to keep/get the original annotation on my field?
(The code should work outside iPOJO as well, So I need my custom - non iPOJO - 
annotations)

Thanks!

 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials

Reply via email to