public class LabeledStatement extends JavaStatement implements StatementContainer, NamedProgramElement, ProgramPrefix
| Modifier and Type | Field and Description | 
|---|---|
protected Statement | 
body
Body. 
 | 
private PosInProgram | 
firstActiveChildPos  | 
private MethodFrame | 
innerMostMethodFrame  | 
protected Label | 
name
Name. 
 | 
private int | 
prefixLength  | 
| Constructor and Description | 
|---|
LabeledStatement(ExtList children,
                Label label,
                PositionInfo pos)
Constructor for the transformation of COMPOST ASTs to KeY. 
 | 
LabeledStatement(Label name)
Labeled statement. 
 | 
LabeledStatement(Label id,
                Statement statement,
                PositionInfo pos)
Labeled statement. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equalsModRenaming(SourceElement se,
                 NameAbstractionTable nat)
testing if programelements are equal modulo renaming abstract
 from names. 
 | 
Statement | 
getBody()
Get body. 
 | 
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. 
 | 
PosInProgram | 
getFirstActiveChildPos()
returns the position of the first active child 
 | 
SourceElement | 
getFirstElement()
Finds the source element that occurs first in the source. 
 | 
SourceElement | 
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source. 
 | 
MethodFrame | 
getInnerMostMethodFrame()
returns the inner most  
MethodFrame | 
Label | 
getLabel()
Get identifier. 
 | 
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
ProgramPrefix | 
getLastPrefixElement()
return the last prefix element 
 | 
java.lang.String | 
getName()
Get name. 
 | 
ProgramPrefix | 
getNextPrefixElement()
return the next prefix element 
 if no next prefix element is available an IndexOutOfBoundsException is thrown 
 | 
ImmutableArray<ProgramPrefix> | 
getPrefixElements()
returns an array with all prefix elements starting at 
 this element 
 | 
int | 
getPrefixLength()
returns the length of the prefix 
 | 
ProgramElementName | 
getProgramElementName()
Get identifier. 
 | 
Statement | 
getStatementAt(int index)
Return the statement at the specified index in this node's
       "virtual" statement array. 
 | 
int | 
getStatementCount()
Get the number of statements in this container. 
 | 
boolean | 
hasNextPrefixElement()
return true if there is a next prefix element 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
compatibleBlockSize, computeHashCode, equals, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchgetEndPosition, getPositionInfo, getRelativePosition, getStartPositionprotected final Label name
protected final Statement body
private final PosInProgram firstActiveChildPos
private final int prefixLength
private final MethodFrame innerMostMethodFrame
public LabeledStatement(ExtList children, Label label, PositionInfo pos)
children - the children of this AST element as KeY classes.
 May contain:   a Label (as name of the label)
                        a Statement (as body of the labeled statement)
                        Commentspublic LabeledStatement(Label name)
name - an identifier.public LabeledStatement(Label id, Statement statement, PositionInfo pos)
id - a Label.statement - a statement.public boolean hasNextPrefixElement()
ProgramPrefixhasNextPrefixElement in interface ProgramPrefixpublic ProgramPrefix getNextPrefixElement()
ProgramPrefixgetNextPrefixElement in interface ProgramPrefixpublic ProgramPrefix getLastPrefixElement()
ProgramPrefixgetLastPrefixElement in interface ProgramPrefixpublic ImmutableArray<ProgramPrefix> getPrefixElements()
ProgramPrefixgetPrefixElements in interface ProgramPrefixpublic SourceElement getFirstElement()
JavaSourceElementgetFirstElement in interface SourceElementgetFirstElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getStartPosition()public SourceElement getFirstElementIncludingBlocks()
SourceElementgetFirstElementIncludingBlocks in interface SourceElementgetFirstElementIncludingBlocks in class JavaSourceElementSourceElement.getStartPosition()public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getEndPosition()public final java.lang.String getName()
getName in interface NamedModelElementpublic Label getLabel()
public ProgramElementName getProgramElementName()
getProgramElementName in interface NamedProgramElementpublic Statement getBody()
public int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic int getStatementCount()
getStatementCount in interface StatementContainerpublic Statement getStatementAt(int index)
getStatementAt in interface StatementContainerindex - an index for a statement.java.lang.ArrayIndexOutOfBoundsException - if index is out
       of bounds.public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.public boolean equalsModRenaming(SourceElement se, NameAbstractionTable nat)
equalsModRenaming in interface SourceElementequalsModRenaming in class JavaNonTerminalProgramElementpublic PosInProgram getFirstActiveChildPos()
ProgramPrefixgetFirstActiveChildPos in interface ProgramPrefixpublic int getPrefixLength()
ProgramPrefixgetPrefixLength in interface ProgramPrefixpublic MethodFrame getInnerMostMethodFrame()
ProgramPrefixMethodFramegetInnerMostMethodFrame in interface ProgramPrefix