asAnnotation abstract method

AnnotationFieldDeclaration? asAnnotation()

Returns the annotation field declaration if it is an annotation field declaration, otherwise null.

Used when we confidently know that the declaration is an annotation field declaration.

Example:

final field = field.asAnnotation();

Implementation

AnnotationFieldDeclaration? asAnnotation();