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 ScopedNodenode
-
Constructor Summary
Constructors Constructor Description AbstractNameDeclaration(ScopedNode node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetImage()Gets the image of the node.StringgetName()Gets the name of the declaration, such as the variable name.ScopedNodegetNode()Gets the node which manifests the declaration.ScopegetScope()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:NameDeclarationGets the node which manifests the declaration.- Specified by:
getNodein interfaceNameDeclaration- Returns:
- the node
-
getImage
public String getImage()
Description copied from interface:NameDeclarationGets the image of the node. This is usually the name of the declaration such as the variable name.- Specified by:
getImagein interfaceNameDeclaration- Returns:
- the image
- See Also:
NameDeclaration.getName()
-
getScope
public Scope getScope()
Description copied from interface:NameDeclarationGets the scope in which this name has been declared.- Specified by:
getScopein interfaceNameDeclaration- Returns:
- the scope
-
getName
public String getName()
Description copied from interface:NameDeclarationGets the name of the declaration, such as the variable name.- Specified by:
getNamein interfaceNameDeclaration- Returns:
-
-