public class OuterBreakContinueAndReturnCollector extends JavaASTVisitor
| Modifier and Type | Field and Description |
|---|---|
private List<Break> |
breaks |
private List<Continue> |
continues |
private Stack<MethodFrame> |
frames |
private Stack<Label> |
labels |
private int |
loopAndSwitchCascadeDepth |
private List<Return> |
returns |
services| Constructor and Description |
|---|
OuterBreakContinueAndReturnCollector(ProgramElement root,
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
|
List<Break> |
getBreaks() |
List<Continue> |
getContinues() |
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, 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, performActionOnLoopInit, performActionOnLoopInvariant, 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, performActionOnWhiledepth, rootprivate int loopAndSwitchCascadeDepth
private final Stack<MethodFrame> frames
public OuterBreakContinueAndReturnCollector(ProgramElement root, List<Label> alwaysInnerLabels, Services services)
public boolean hasReturns()
public void collect()
public void start()
JavaASTWalkerstart in class JavaASTWalkerprotected void walk(ProgramElement node)
JavaASTWalkerwalk in class JavaASTVisitornode - the JavaProgramElement the walker is atprotected void doAction(ProgramElement node)
JavaASTVisitordoAction in class JavaASTVisitorprotected void doDefaultAction(SourceElement x)
JavaASTVisitordoDefaultAction in class JavaASTVisitorpublic void performActionOnBreak(Break x)
performActionOnBreak in interface VisitorperformActionOnBreak in class JavaASTVisitorpublic void performActionOnContinue(Continue x)
performActionOnContinue in interface VisitorperformActionOnContinue in class JavaASTVisitorprivate boolean isJumpToOuterLabel(LabelJumpStatement x)
public void performActionOnReturn(Return x)
performActionOnReturn in interface VisitorperformActionOnReturn in class JavaASTVisitor