I`d like to create my own annotations to annotate some local variable. To write the annotation is not the problem, the problem is to get the information of them at the Runtime. I could only get some information from annotated methods or method parameters, but not from local variables. Is there any way to get it?
My own annotation is something like that:
public void m(int a)
@MyOwnAnnotation(some information)
int b = 5;
}
Or, as an alternative, is there any way to get the code of the method, to parse it further and finally get annotation value?
Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…