public class OuterBreakContinueAndReturnCollector extends JavaASTVisitor
Modifier and Type | Field and Description |
---|---|
private java.util.List<Break> |
breaks |
private java.util.List<Continue> |
continues |
private java.util.Stack<MethodFrame> |
frames |
private java.util.Stack<Label> |
labels |
private int |
loopAndSwitchCascadeDepth |
private java.util.List<Return> |
returns |
services
Constructor and Description |
---|
OuterBreakContinueAndReturnCollector(ProgramElement root,
java.util.List<Label> alwaysInnerLabels,
Services services) |
Modifier and Type | Method and Description |
---|---|
void |
collect() |
protected void |
doAction(ProgramElement node)
the action that is performed just before leaving the node the last time
|
protected void |
doDefaultAction(SourceElement x)
the action that is performed just before leaving the node the
last time
|
java.util.List<Break> |
getBreaks() |
java.util.List<Continue> |
getContinues() |
java.util.List<Return> |
getReturns() |
boolean |
hasReturns() |
private boolean |
isJumpToOuterLabel(LabelJumpStatement x) |
void |
performActionOnBreak(Break x) |
void |
performActionOnContinue(Continue x) |
void |
performActionOnReturn(Return x) |
void |
start()
starts the walker
|
protected void |
walk(ProgramElement node)
walks through the AST.
|
performActionOnAbstractProgramElement, performActionOnAllFields, performActionOnAllObjects, performActionOnArrayDeclaration, performActionOnArrayInitializer, performActionOnArrayLengthReference, performActionOnArrayReference, performActionOnAssert, performActionOnBinaryAnd, performActionOnBinaryAndAssignment, performActionOnBinaryNot, performActionOnBinaryOr, performActionOnBinaryOrAssignment, performActionOnBinaryXOr, performActionOnBinaryXOrAssignment, performActionOnBlockContract, performActionOnBlockContract, performActionOnBooleanLiteral, performActionOnCase, performActionOnCatch, performActionOnCatchAllStatement, performActionOnCharLiteral, performActionOnClassDeclaration, performActionOnClassInitializer, performActionOnComment, performActionOnCompilationUnit, performActionOnConditional, performActionOnConstructorDeclaration, performActionOnContextStatementBlock, performActionOnCopyAssignment, performActionOnDefault, performActionOnDivide, performActionOnDivideAssignment, performActionOnDLEmbeddedExpression, performActionOnDo, performActionOnDoubleLiteral, performActionOnElse, performActionOnEmptyMapLiteral, performActionOnEmptySeqLiteral, performActionOnEmptySetLiteral, performActionOnEmptyStatement, performActionOnEnhancedFor, performActionOnEquals, performActionOnExactInstanceof, performActionOnExecutionContext, performActionOnExtends, performActionOnFieldDeclaration, performActionOnFieldReference, performActionOnFieldSpecification, performActionOnFinally, performActionOnFloatLiteral, performActionOnFor, performActionOnForUpdates, performActionOnGreaterOrEquals, performActionOnGreaterThan, performActionOnGuard, performActionOnIf, performActionOnImplements, performActionOnImplicitFieldSpecification, performActionOnImport, performActionOnInstanceof, performActionOnInterfaceDeclaration, performActionOnIntersect, performActionOnIntLiteral, performActionOnIProgramVariable, performActionOnLabeledStatement, performActionOnLessOrEquals, performActionOnLessThan, performActionOnLocalVariableDeclaration, performActionOnLocationVariable, performActionOnLogicalAnd, performActionOnLogicalNot, performActionOnLogicalOr, performActionOnLongLiteral, performActionOnLoopContract, performActionOnLoopContract, performActionOnLoopContract, performActionOnLoopInit, performActionOnLoopInvariant, performActionOnLoopScopeBlock, performActionOnMergeContract, performActionOnMergePointStatement, performActionOnMetaClassReference, performActionOnMethod, performActionOnMethodBodyStatement, performActionOnMethodDeclaration, performActionOnMethodFrame, performActionOnMethodReference, performActionOnMinus, performActionOnMinusAssignment, performActionOnModifier, performActionOnModulo, performActionOnModuloAssignment, performActionOnNegative, performActionOnNew, performActionOnNewArray, performActionOnNotEquals, performActionOnNullLiteral, performActionOnPackageReference, performActionOnPackageSpecification, performActionOnParameterDeclaration, performActionOnParenthesizedExpression, performActionOnPassiveExpression, performActionOnPlus, performActionOnPlusAssignment, performActionOnPositive, performActionOnPostDecrement, performActionOnPostIncrement, performActionOnPreDecrement, performActionOnPreIncrement, performActionOnProgramConstant, performActionOnProgramElementName, performActionOnProgramMetaConstruct, performActionOnProgramMethod, performActionOnProgramVariable, performActionOnSchematicFieldReference, performActionOnSchemaVariable, performActionOnSeqConcat, performActionOnSeqGet, performActionOnSeqIndexOf, performActionOnSeqLength, performActionOnSeqReverse, performActionOnSeqSingleton, performActionOnSeqSub, performActionOnSetMinus, performActionOnSetUnion, performActionOnShiftLeft, performActionOnShiftLeftAssignment, performActionOnShiftRight, performActionOnShiftRightAssignment, performActionOnSingleton, performActionOnStatementBlock, performActionOnStringLiteral, performActionOnSuperArrayDeclaration, performActionOnSuperConstructorReference, performActionOnSuperReference, performActionOnSwitch, performActionOnSynchronizedBlock, performActionOnThen, performActionOnThisConstructorReference, performActionOnThisReference, performActionOnThrow, performActionOnThrows, performActionOnTimes, performActionOnTimesAssignment, performActionOnTransactionStatement, performActionOnTry, performActionOnTypeCast, performActionOnTypeReference, performActionOnUnsignedShiftRight, performActionOnUnsignedShiftRightAssignment, performActionOnVariableDeclaration, performActionOnVariableReference, performActionOnVariableSpecification, performActionOnWhile
depth, root
private final java.util.List<Break> breaks
private final java.util.List<Continue> continues
private final java.util.List<Return> returns
private int loopAndSwitchCascadeDepth
private final java.util.Stack<Label> labels
private final java.util.Stack<MethodFrame> frames
public OuterBreakContinueAndReturnCollector(ProgramElement root, java.util.List<Label> alwaysInnerLabels, Services services)
public java.util.List<Break> getBreaks()
public java.util.List<Continue> getContinues()
public java.util.List<Return> getReturns()
public boolean hasReturns()
public void collect()
public void start()
JavaASTWalker
start
in class JavaASTWalker
protected void walk(ProgramElement node)
JavaASTWalker
walk
in class JavaASTVisitor
node
- the JavaProgramElement the walker is atprotected void doAction(ProgramElement node)
JavaASTVisitor
doAction
in class JavaASTVisitor
protected void doDefaultAction(SourceElement x)
JavaASTVisitor
doDefaultAction
in class JavaASTVisitor
x
- the node described abovepublic void performActionOnBreak(Break x)
performActionOnBreak
in interface Visitor
performActionOnBreak
in class JavaASTVisitor
public void performActionOnContinue(Continue x)
performActionOnContinue
in interface Visitor
performActionOnContinue
in class JavaASTVisitor
private boolean isJumpToOuterLabel(LabelJumpStatement x)
public void performActionOnReturn(Return x)
performActionOnReturn
in interface Visitor
performActionOnReturn
in class JavaASTVisitor