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, performActionOnWhile
depth, root
private 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()
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
public 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