public class ProgramElementName extends Name implements TerminalProgramElement, Label, ReferenceSuffix, MethodName
| Modifier and Type | Field and Description |
|---|---|
private Comment[] |
comments |
private NameCreationInfo |
creationInfo |
private java.lang.String |
qualifierString |
private java.lang.String |
shortName |
| Constructor and Description |
|---|
ProgramElementName(java.lang.String name)
create a new name
|
ProgramElementName(java.lang.String name,
Comment[] c)
create a new name
|
ProgramElementName(java.lang.String name,
NameCreationInfo creationInfo) |
ProgramElementName(java.lang.String name,
NameCreationInfo creationInfo,
Comment[] c) |
ProgramElementName(java.lang.String n,
java.lang.String q) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
boolean |
equalsModRenaming(SourceElement se,
NameAbstractionTable nat)
equals modulo renaming is described in the corresponding
comment in class SourceElement.
|
Comment[] |
getComments()
Get comments.
|
NameCreationInfo |
getCreationInfo() |
Position |
getEndPosition()
Returns the end position of the primary token of this element.
|
SourceElement |
getFirstElement()
to be compatible to a ProgramElement
|
SourceElement |
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source.
|
SourceElement |
getLastElement()
to be compatible to a ProgramElement
|
PositionInfo |
getPositionInfo()
complete position information
|
java.lang.String |
getProgramName() |
java.lang.String |
getQualifier() |
Position |
getRelativePosition()
Returns the relative position (number of blank heading lines and
columns) of the primary token of this element.
|
Position |
getStartPosition()
Returns the start position of the primary token of this element.
|
int |
hashCode() |
MatchConditions |
match(SourceData source,
MatchConditions matchCond)
matches the source "text" (@link SourceData#getSource()) against the pattern represented
by this object.
|
void |
prettyPrint(PrettyPrinter w)
Pretty print.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
private final java.lang.String qualifierString
private final java.lang.String shortName
private final NameCreationInfo creationInfo
private final Comment[] comments
public ProgramElementName(java.lang.String name)
name - the String with the name of the program elementpublic ProgramElementName(java.lang.String name,
Comment[] c)
name - the String with the name of the program elementpublic ProgramElementName(java.lang.String name,
NameCreationInfo creationInfo)
public ProgramElementName(java.lang.String name,
NameCreationInfo creationInfo,
Comment[] c)
public ProgramElementName(java.lang.String n,
java.lang.String q)
public Comment[] getComments()
ProgramElementgetComments in interface LabelgetComments in interface ProgramElementpublic SourceElement getFirstElement()
getFirstElement in interface LabelgetFirstElement in interface SourceElementSourceElement.getStartPosition()public SourceElement getFirstElementIncludingBlocks()
SourceElementgetFirstElementIncludingBlocks in interface SourceElementSourceElement.getStartPosition()public SourceElement getLastElement()
getLastElement in interface LabelgetLastElement in interface SourceElementSourceElement.getEndPosition()public void prettyPrint(PrettyPrinter w) throws java.io.IOException
SourceElementprettyPrint in interface LabelprettyPrint in interface SourceElementw - a pretty printer.java.io.IOException - occasionally thrown.public void visit(Visitor v)
visit in interface Labelvisit in interface SourceElementv - the Visitorpublic Position getStartPosition()
getFirstElement().getStartPosition in interface LabelgetStartPosition in interface SourceElementpublic Position getEndPosition()
getLastElement().getEndPosition in interface LabelgetEndPosition in interface SourceElementpublic Position getRelativePosition()
getFirstElement().getRelativePosition in interface LabelgetRelativePosition in interface SourceElementpublic PositionInfo getPositionInfo()
SourceElementgetPositionInfo in interface SourceElementpublic boolean equalsModRenaming(SourceElement se, NameAbstractionTable nat)
equalsModRenaming in interface SourceElementpublic java.lang.String getQualifier()
public java.lang.String getProgramName()
public NameCreationInfo getCreationInfo()
public MatchConditions match(SourceData source, MatchConditions matchCond)
ProgramElementMatchConditions with
the found instantiations of the schemavariables. If the match
failed, null is returned instead.match in interface ProgramElementsource - the SourceData with the program element to matchmatchCond - the MatchConditions found up to this point