getAnnotations abstract method

List<AnnotationDeclaration> getAnnotations()

Returns all annotations applied to this declaration.

You can inspect custom or built-in annotations and their arguments:

Example

for (final annotation in declaration.getAnnotations()) {
  print(annotation.getTypeDeclaration().getName());
  print(annotation.getArguments());
}

Implementation

List<AnnotationDeclaration> getAnnotations();