Class AbstractNameDeclaration
- java.lang.Object
-
- net.sourceforge.pmd.lang.symboltable.AbstractNameDeclaration
-
- All Implemented Interfaces:
NameDeclaration
public abstract class AbstractNameDeclaration extends Object implements NameDeclaration
Base class for all name declarations.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScopedNode
node
-
Constructor Summary
Constructors Constructor Description AbstractNameDeclaration(ScopedNode node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getImage()
Gets the image of the node.String
getName()
Gets the name of the declaration, such as the variable name.ScopedNode
getNode()
Gets the node which manifests the declaration.Scope
getScope()
Gets the scope in which this name has been declared.
-
-
-
Field Detail
-
node
protected ScopedNode node
-
-
Constructor Detail
-
AbstractNameDeclaration
public AbstractNameDeclaration(ScopedNode node)
-
-
Method Detail
-
getNode
public ScopedNode getNode()
Description copied from interface:NameDeclaration
Gets the node which manifests the declaration.- Specified by:
getNode
in interfaceNameDeclaration
- Returns:
- the node
-
getImage
public String getImage()
Description copied from interface:NameDeclaration
Gets the image of the node. This is usually the name of the declaration such as the variable name.- Specified by:
getImage
in interfaceNameDeclaration
- Returns:
- the image
- See Also:
NameDeclaration.getName()
-
getScope
public Scope getScope()
Description copied from interface:NameDeclaration
Gets the scope in which this name has been declared.- Specified by:
getScope
in interfaceNameDeclaration
- Returns:
- the scope
-
getName
public String getName()
Description copied from interface:NameDeclaration
Gets the name of the declaration, such as the variable name.- Specified by:
getName
in interfaceNameDeclaration
- Returns:
-
-