[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How to access annotation values

Hallo,

I am new to aspectJ 1.5 & annotations and world like to access an annotation value at runtime. My Java source is :

@loglevel{id=1}
public void helloMethod(){
 ....
}

@loglevel has a runtime retention policy and I would like to access the id within an aspect. Can somebody provide me a source
code example for this? The aspect should simply output the loglevel id to stdout. 

Would it be also possible to set loglevels retention policy to SOURCE or CLASS?

Thank you very much,

Andreas Bednarz