Reputation: 1927
I am using package:analyzer package. I have extended SimpleElementVisitor
to visit all the fields of the class. visitFieldElement(FieldElement element)
is providing all the fields data type and fields name. But some of the fields are annotated with custom annotation. How I can read the metadata of that annotation?
Upvotes: 1
Views: 1914
Reputation: 10925
From the Element
instance (A FieldElement
in the example) you can use the metadata
field to read out annotations.
Upvotes: 1