Interface JVariableSymbol
- All Superinterfaces:
AnnotableSymbol
,JElementSymbol
- All Known Subinterfaces:
JFieldSymbol
,JFormalParamSymbol
,JLocalVariableSymbol
- Since:
- 7.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetTypeMirror
(Substitution subst) Returns the type of this value, under the given substitution.default boolean
isField()
Returns true if this is a field symbol.boolean
isFinal()
Returns true if this declaration is declared final.default ASTVariableId
Returns the node that declares this symbol.Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.AnnotableSymbol
getDeclaredAnnotation, getDeclaredAnnotations, isAnnotationPresent
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JElementSymbol
acceptVisitor, equals, getSimpleName, getTypeSystem, isUnresolved, nameEquals
-
Method Details
-
isField
default boolean isField()Returns true if this is a field symbol.- See Also:
-
isFinal
boolean isFinal()Returns true if this declaration is declared final. This takes implicit modifiers into account. -
getTypeMirror
Returns the type of this value, under the given substitution. -
tryGetNode
Description copied from interface:JElementSymbol
Returns the node that declares this symbol. Eg forJMethodSymbol
, it's anASTMethodDeclaration
. Will only return non-null if the symbol is declared in the file currently being analysed.- Specified by:
tryGetNode
in interfaceJElementSymbol
-