Interface JVariableSymbol
-
- All Superinterfaces:
AnnotableSymbol
,JElementSymbol
- All Known Subinterfaces:
JFieldSymbol
,JFormalParamSymbol
,JLocalVariableSymbol
public interface JVariableSymbol extends AnnotableSymbol
- Since:
- 7.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description JTypeMirror
getTypeMirror(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 @Nullable N
tryGetNode()
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 Detail
-
isField
default boolean isField()
Returns true if this is a field symbol.- See Also:
JFieldSymbol
-
isFinal
boolean isFinal()
Returns true if this declaration is declared final. This takes implicit modifiers into account.
-
getTypeMirror
JTypeMirror getTypeMirror(Substitution subst)
Returns the type of this value, under the given substitution.
-
tryGetNode
default @Nullable N 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
-
-