Package org.sonar.java.resolve
Class SymbolMetadataResolve
- java.lang.Object
-
- org.sonar.java.resolve.SymbolMetadataResolve
-
- All Implemented Interfaces:
SymbolMetadata
public class SymbolMetadataResolve extends Object implements SymbolMetadata
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sonar.plugins.java.api.semantic.SymbolMetadata
SymbolMetadata.AnnotationInstance, SymbolMetadata.AnnotationValue
-
-
Constructor Summary
Constructors Constructor Description SymbolMetadataResolve()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SymbolMetadata.AnnotationInstance>
annotations()
The list of annotations found on this symbol.boolean
isAnnotatedWith(String fullyQualifiedName)
Check if the symbol is annotated with the specified annotation.List<SymbolMetadata.AnnotationValue>
valuesForAnnotation(String fullyQualifiedNameOfAnnotation)
Get the annotation values for the specified annotation.
-
-
-
Method Detail
-
annotations
public List<SymbolMetadata.AnnotationInstance> annotations()
Description copied from interface:SymbolMetadata
The list of annotations found on this symbol.- Specified by:
annotations
in interfaceSymbolMetadata
- Returns:
- A list of
SymbolMetadata.AnnotationInstance
-
isAnnotatedWith
public boolean isAnnotatedWith(String fullyQualifiedName)
Description copied from interface:SymbolMetadata
Check if the symbol is annotated with the specified annotation.- Specified by:
isAnnotatedWith
in interfaceSymbolMetadata
- Parameters:
fullyQualifiedName
- fully Qualified Name of the annotation- Returns:
- true if the symbol is annotated with the annotation
-
valuesForAnnotation
@CheckForNull public List<SymbolMetadata.AnnotationValue> valuesForAnnotation(String fullyQualifiedNameOfAnnotation)
Description copied from interface:SymbolMetadata
Get the annotation values for the specified annotation.- Specified by:
valuesForAnnotation
in interfaceSymbolMetadata
- Parameters:
fullyQualifiedNameOfAnnotation
- fully Qualified Name of the annotation- Returns:
- null if the annotation is not present, a List otherwise
-
-