I have an AnnotationExpr, how do I get parameters and their values of the annotation (e.g. @UnityBridge(fullClassName = "test") - how do I obtain a value of fullClassName parameter). Does JavaParser support this?
Do I have to accept another visitor? Which one in this case?
Late answer, I came into the same problem, just cast the AnnotationExpr to one of following:
MarkerAnnotationExpr (for no parameter),
SingleMemberAnnotationExpr (for single parameter),
NormalAnnotationExpr (for multiple parameters).
You may need instanceof to determine current annotation type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With