How can I get the value of the annotation using Java Reflection
?
This is the annotated method:
@JsonView( { View.class } )
public Element getElement()
{
return element;
}
How can I get the value of the annotation using Java Reflection
?
This is the annotated method:
@JsonView( { View.class } )
public Element getElement()
{
return element;
}
Here the some way to get annotation,
Assuming that your method is declared in class
MyClass
, do the following: