Interface SymbolMetadata
public interface SymbolMetadata
Holds the metadata information (annotations) of a symbol.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceOccurrence of an annotation on a symbol.static interfaceValue of a property of an annotation.static interfacestatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionThe list of all annotations found on this symbol, including annotations that are present on the parametrized types.findAnnotationTree(SymbolMetadata.AnnotationInstance annotationInstance) booleanisAnnotatedWith(String fullyQualifiedName) Check if the symbol is annotated with the specified annotation.The list of annotations that applies exactly on this symbol.valuesForAnnotation(String fullyQualifiedNameOfAnnotation) Get the annotation values for the specified annotation.
-
Method Details
-
isAnnotatedWith
Check if the symbol is annotated with the specified annotation.- Parameters:
fullyQualifiedName- fully Qualified Name of the annotation- Returns:
- true if the symbol is annotated with the annotation
-
valuesForAnnotation
@CheckForNull List<SymbolMetadata.AnnotationValue> valuesForAnnotation(String fullyQualifiedNameOfAnnotation) Get the annotation values for the specified annotation.- Parameters:
fullyQualifiedNameOfAnnotation- fully Qualified Name of the annotation- Returns:
- null if the annotation is not present, a List otherwise
-
annotations
List<SymbolMetadata.AnnotationInstance> annotations()The list of all annotations found on this symbol, including annotations that are present on the parametrized types.- Returns:
- A list of
SymbolMetadata.AnnotationInstance
-
symbolAnnotations
List<SymbolMetadata.AnnotationInstance> symbolAnnotations()The list of annotations that applies exactly on this symbol.- Returns:
- A list of
SymbolMetadata.AnnotationInstance
-
nullabilityData
SymbolMetadata.NullabilityData nullabilityData()- Returns:
- the nullability definition for metadata() of: - fields - method parameters - methods (related to method return values) - local variables And currently always return UNKNOWN_NULLABILITY for unsupported metadata() of: - lambda parameters
-
nullabilityData
-
findAnnotationTree
-
parametersMetadata
SymbolMetadata[] parametersMetadata()- Returns:
- the metadata of the parameterized types of the current metadata
If the current metadata is attached to
@NonNull List<@Nullable String>, it will return an array containing one metadata describing@Nullable String.
-