public class ContextStatementBlock extends StatementBlock
Constructor and Description |
---|
ContextStatementBlock(ExtList children)
creates a ContextStatementBlock
|
ContextStatementBlock(ExtList children,
IExecutionContext executionContext)
creates a ContextStatementBlock
|
ContextStatementBlock(Statement[] body,
IExecutionContext executionContext) |
ContextStatementBlock(Statement s,
IExecutionContext executionContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
compatibleBlockSize(int pos,
int max)
overrides the check of the superclass as unmatched elements will disappear in
the suffix of this ContextStatementBlock
|
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.
|
IExecutionContext |
getExecutionContext() |
TypeDeclaration |
getTypeDeclarationAt(int index) |
int |
getTypeDeclarationCount()
Get the number of type declarations in this container.
|
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 printing the source element.
|
boolean |
requiresExplicitExecutionContextMatch() |
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
|
computePrefixElements, equalsModRenaming, getBody, getFirstActiveChildPos, getFirstElement, getFirstElementIncludingBlocks, getInnerMostMethodFrame, getLastPrefixElement, getNextPrefixElement, getPrefixElements, getPrefixLength, getStatementAt, getStatementCount, hasNextPrefixElement, isEmpty
computeHashCode, equals, getArrayPos, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments
getEndPosition, getLastElement, getPositionInfo, getRelativePosition, getStartPosition
public ContextStatementBlock(ExtList children)
children
- the body of the context termpublic ContextStatementBlock(ExtList children, IExecutionContext executionContext)
children
- the body of the context termexecutionContext
- the required execution contextpublic ContextStatementBlock(Statement s, IExecutionContext executionContext)
public ContextStatementBlock(Statement[] body, IExecutionContext executionContext)
public boolean requiresExplicitExecutionContextMatch()
public IExecutionContext getExecutionContext()
public int getChildCount()
getChildCount
in interface NonTerminalProgramElement
getChildCount
in class StatementBlock
public ProgramElement getChildAt(int index)
getChildAt
in interface NonTerminalProgramElement
getChildAt
in class StatementBlock
index
- an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException
- if index is out
of boundspublic void visit(Visitor v)
visit
in interface SourceElement
visit
in class StatementBlock
v
- the Visitorpublic void prettyPrint(PrettyPrinter w) throws java.io.IOException
JavaSourceElement
prettyPrint
in interface SourceElement
prettyPrint
in class StatementBlock
w
- a pretty printer.java.io.IOException
- occasionally thrown.public java.lang.String toString()
JavaSourceElement
toString
in class JavaSourceElement
public int getTypeDeclarationCount()
StatementBlock
getTypeDeclarationCount
in interface TypeDeclarationContainer
getTypeDeclarationCount
in class StatementBlock
public TypeDeclaration getTypeDeclarationAt(int index)
getTypeDeclarationAt
in interface TypeDeclarationContainer
getTypeDeclarationAt
in class StatementBlock
public boolean compatibleBlockSize(int pos, int max)
compatibleBlockSize
in class JavaNonTerminalProgramElement
public MatchConditions match(SourceData source, MatchConditions matchCond)
ProgramElement
MatchConditions
with
the found instantiations of the schemavariables. If the match
failed, null is returned instead.match
in interface ProgramElement
match
in class JavaNonTerminalProgramElement
source
- the SourceData with the program element to matchmatchCond
- the MatchConditions found up to this pointCopyright © 2003-2019 The KeY-Project.