Jonathan
Jonathan

Reputation: 4928

How to get the start and end number of an ElementAnnotation?

The ElementAnnotation from the analyzer package is really not an element so I can't use ParsedLibraryResult.getElementDeclaration on it.

How can I know the offset and end of an ElementAnnotation?

Upvotes: 0

Views: 27

Answers (1)

Jonathan
Jonathan

Reputation: 4928

I had to get the node from the ClassElement and loop through its childEntities and manually find the nodes from the annotations.

Upvotes: 0

Related Questions