public abstract class InheritanceSpecification extends JavaNonTerminalProgramElement implements TypeReferenceContainer
Modifier and Type | Field and Description |
---|---|
protected ImmutableArray<TypeReference> |
supertypes
Supertypes.
|
Modifier | Constructor and Description |
---|---|
|
InheritanceSpecification()
Inheritance specification.
|
protected |
InheritanceSpecification(ExtList children)
Inheritance specification.
|
|
InheritanceSpecification(TypeReference supertype)
Inheritance specification.
|
|
InheritanceSpecification(TypeReference[] supertypes)
Inheritance specification.
|
Modifier and Type | Method and Description |
---|---|
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 |
getLastElement()
Finds the source element that occurs last in the source.
|
ImmutableArray<TypeReference> |
getSupertypes()
Get supertypes.
|
TypeReference |
getTypeReferenceAt(int index) |
int |
getTypeReferenceCount()
Get the number of type references in this container.
|
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrint, prettyPrintMain, reuseSignature
getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
equalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPosition, prettyPrint, visit
protected final ImmutableArray<TypeReference> supertypes
public InheritanceSpecification()
public InheritanceSpecification(TypeReference supertype)
supertype
- a type reference.public InheritanceSpecification(TypeReference[] supertypes)
supertypes
- a type reference mutable list.protected InheritanceSpecification(ExtList children)
children
- the ExtList may include: a Comment
several TypeReference (as references to the supertypes)
a Commentpublic SourceElement getLastElement()
JavaSourceElement
getLastElement
in interface SourceElement
getLastElement
in class JavaSourceElement
JavaSourceElement.toSource()
,
JavaSourceElement.getEndPosition()
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 ImmutableArray<TypeReference> getSupertypes()
public int getTypeReferenceCount()
getTypeReferenceCount
in interface TypeReferenceContainer
public TypeReference getTypeReferenceAt(int index)
getTypeReferenceAt
in interface TypeReferenceContainer