public class PackageReference extends JavaNonTerminalProgramElement implements TypeReferenceInfix, PackageReferenceContainer
Modifier and Type | Field and Description |
---|---|
protected ProgramElementName |
name
Name.
|
protected ReferencePrefix |
prefix
Prefix.
|
Constructor and Description |
---|
PackageReference(ExtList children)
Constructor for the transformation of COMPOST ASTs to KeY.
|
PackageReference(ProgramElementName name,
ReferencePrefix prefix) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
ProgramElement |
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
child array
|
int |
getChildCount()
Returns the number of children of this node.
|
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
SourceElement |
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source.
|
java.lang.String |
getName()
Get name.
|
PackageReference |
getPackageReference()
Get the package reference.
|
ProgramElementName |
getProgramElementName()
Get identifier.
|
ReferencePrefix |
getReferencePrefix()
Get reference prefix.
|
void |
prettyPrint(PrettyPrinter p)
Pretty printing the source element.
|
ReferencePrefix |
setReferencePrefix(ReferencePrefix r) |
java.lang.String |
toString()
toString
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
compatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
protected final ReferencePrefix prefix
protected final ProgramElementName name
public PackageReference(ExtList children)
children
- the children of this AST element as KeY classes.
May contain:
a ProgramElementName (as the name of the method reference),
a ReferencePrefix (as accessPath to the package),
Comments.public PackageReference(ProgramElementName name, ReferencePrefix prefix)
public SourceElement getFirstElement()
JavaSourceElement
getFirstElement
in interface SourceElement
getFirstElement
in class JavaSourceElement
JavaSourceElement.toSource()
,
JavaSourceElement.getStartPosition()
public SourceElement getFirstElementIncludingBlocks()
SourceElement
getFirstElementIncludingBlocks
in interface SourceElement
getFirstElementIncludingBlocks
in class JavaSourceElement
SourceElement.getStartPosition()
public int getChildCount()
getChildCount
in interface NonTerminalProgramElement
public ProgramElement getChildAt(int index)
getChildAt
in interface NonTerminalProgramElement
index
- an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException
- if index is out
of boundspublic ReferencePrefix getReferencePrefix()
getReferencePrefix
in interface ReferencePrefix
public PackageReference getPackageReference()
getPackageReference
in interface PackageReferenceContainer
public final java.lang.String getName()
getName
in interface NamedModelElement
public ProgramElementName getProgramElementName()
getProgramElementName
in interface NamedProgramElement
public void visit(Visitor v)
visit
in interface SourceElement
v
- the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElement
prettyPrint
in interface SourceElement
prettyPrint
in class JavaProgramElement
p
- a pretty printer.java.io.IOException
- occasionally thrown.public ReferencePrefix setReferencePrefix(ReferencePrefix r)
public boolean equals(java.lang.Object o)
equals
in class JavaNonTerminalProgramElement
public java.lang.String toString()
JavaSourceElement
toString
in class JavaSourceElement