Interface AnnotableSymbol
-
- All Superinterfaces:
JElementSymbol
- All Known Subinterfaces:
JAccessibleElementSymbol
,JClassSymbol
,JConstructorSymbol
,JExecutableSymbol
,JFieldSymbol
,JFormalParamSymbol
,JLocalVariableSymbol
,JMethodSymbol
,JTypeDeclSymbol
,JTypeParameterOwnerSymbol
,JTypeParameterSymbol
,JVariableSymbol
- All Known Implementing Classes:
AstLocalVarSym
public interface AnnotableSymbol extends JElementSymbol
A symbol that can have annotations.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default SymbolicValue.SymAnnot
getDeclaredAnnotation(Class<? extends Annotation> type)
Return an annotation of the given type, if it is present on this declaration.default org.pcollections.PSet<SymbolicValue.SymAnnot>
getDeclaredAnnotations()
Return the valid symbolic annotations defined on this symbol.default boolean
isAnnotationPresent(Class<? extends Annotation> type)
Return true if an annotation of the given type is present on this declaration.-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JElementSymbol
acceptVisitor, equals, getSimpleName, getTypeSystem, isUnresolved, nameEquals, tryGetNode
-
-
-
-
Method Detail
-
getDeclaredAnnotations
default org.pcollections.PSet<SymbolicValue.SymAnnot> getDeclaredAnnotations()
Return the valid symbolic annotations defined on this symbol. Annotations that could not be converted, eg because they are written with invalid code, are discarded, so this might not match the annotations on a node one to one.
-
getDeclaredAnnotation
default SymbolicValue.SymAnnot getDeclaredAnnotation(Class<? extends Annotation> type)
Return an annotation of the given type, if it is present on this declaration. This does not consider inherited annotations.
-
isAnnotationPresent
default boolean isAnnotationPresent(Class<? extends Annotation> type)
Return true if an annotation of the given type is present on this declaration.
-
-