0

Scenario is something like below...

@Component
@Migration(description="Test Description", serial="")
public class TestUpdate1 {

}

I need to get the value of description
i.e. "Test Description"

How can I do that

neelrotno
  • 159
  • 2
  • 8
  • 3
    Possible duplicate of [Is it possible to read the value of a annotation in java?](http://stackoverflow.com/questions/4296910/is-it-possible-to-read-the-value-of-a-annotation-in-java) – Naman Mar 05 '17 at 07:20

1 Answers1

0

You can possibly get the value like this way

JsonElement jsonElement = methods[i].getAnnotation(JsonElement.class);

int type = jsonElement.type();
Omer
  • 534
  • 7
  • 19
  • I need to get the value of a annotation property(description) where the annotation applied on a class(see the example), not on a method – neelrotno Mar 05 '17 at 07:30