public class ProgramVariableCollector extends JavaASTVisitor
Modifier and Type | Field and Description |
---|---|
private java.util.LinkedHashSet<LocationVariable> |
result |
services
Constructor and Description |
---|
ProgramVariableCollector(ProgramElement root,
Services services)
collects all program variables occurring in the AST root using
this constructor is equivalent to
ProggramVariableCollector(root, false)
|
Modifier and Type | Method and Description |
---|---|
protected void |
collectHeapVariables() |
protected void |
doDefaultAction(SourceElement x)
the action that is performed just before leaving the node the
last time
|
void |
performActionOnBlockContract(BlockContract x) |
void |
performActionOnLocationVariable(LocationVariable x) |
void |
performActionOnLoopContract(LoopContract x) |
void |
performActionOnLoopInvariant(LoopSpecification x) |
void |
performActionOnMergeContract(MergeContract x) |
java.util.LinkedHashSet<LocationVariable> |
result() |
void |
start()
starts the walker
|
java.lang.String |
toString() |
doAction, performActionOnAbstractProgramElement, performActionOnAllFields, performActionOnAllObjects, performActionOnArrayDeclaration, performActionOnArrayInitializer, performActionOnArrayLengthReference, performActionOnArrayReference, performActionOnAssert, performActionOnBinaryAnd, performActionOnBinaryAndAssignment, performActionOnBinaryNot, performActionOnBinaryOr, performActionOnBinaryOrAssignment, performActionOnBinaryXOr, performActionOnBinaryXOrAssignment, performActionOnBlockContract, performActionOnBooleanLiteral, performActionOnBreak, performActionOnCase, performActionOnCatch, performActionOnCatchAllStatement, performActionOnCharLiteral, performActionOnClassDeclaration, performActionOnClassInitializer, performActionOnComment, performActionOnCompilationUnit, performActionOnConditional, performActionOnConstructorDeclaration, performActionOnContextStatementBlock, performActionOnContinue, 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, performActionOnLogicalAnd, performActionOnLogicalNot, performActionOnLogicalOr, performActionOnLongLiteral, performActionOnLoopContract, performActionOnLoopContract, performActionOnLoopInit, performActionOnLoopScopeBlock, 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, performActionOnReturn, 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, walk
depth, root
private final java.util.LinkedHashSet<LocationVariable> result
public ProgramVariableCollector(ProgramElement root, Services services)
root
- the ProgramElement which is the root of the ASTservices
- the Services objectprotected void collectHeapVariables()
public void start()
JavaASTWalker
start
in class JavaASTWalker
public java.util.LinkedHashSet<LocationVariable> result()
public java.lang.String toString()
toString
in class java.lang.Object
protected void doDefaultAction(SourceElement x)
JavaASTVisitor
doDefaultAction
in class JavaASTVisitor
x
- the node described abovepublic void performActionOnLocationVariable(LocationVariable x)
performActionOnLocationVariable
in interface Visitor
performActionOnLocationVariable
in class JavaASTVisitor
public void performActionOnMergeContract(MergeContract x)
performActionOnMergeContract
in interface Visitor
performActionOnMergeContract
in class JavaASTVisitor
public void performActionOnLoopInvariant(LoopSpecification x)
performActionOnLoopInvariant
in interface Visitor
performActionOnLoopInvariant
in class JavaASTVisitor
public void performActionOnBlockContract(BlockContract x)
performActionOnBlockContract
in interface Visitor
performActionOnBlockContract
in class JavaASTVisitor
public void performActionOnLoopContract(LoopContract x)
performActionOnLoopContract
in interface Visitor
performActionOnLoopContract
in class JavaASTVisitor