Class AbstractNodeVisitor<R,P>
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor<R,P>
-
- Type Parameters:
R
- return type of the visitorP
- parameter type of the visitor
- All Implemented Interfaces:
NodeVisitor<R,P>
- Direct Known Subclasses:
BusyExprTransfer
,CFAbstractTransfer
,ConstantPropagationTransfer
,LiveVarTransfer
,ReachingDefinitionTransfer
public abstract class AbstractNodeVisitor<R,P> extends java.lang.Object implements NodeVisitor<R,P>
A default implementation of the node visitor interface. The class introduces several 'summary' methods, that can be overridden to change the behavior of several related visit methods at once. An example is thevisitValueLiteral(org.checkerframework.dataflow.cfg.node.ValueLiteralNode, P)
method, which is called for everyValueLiteralNode
.This is useful to implement a visitor that performs the same operation (e.g., nothing) for most
Node
s and only has special behavior for a few.
-
-
Constructor Summary
Constructors Constructor Description AbstractNodeVisitor()
-
Method Summary
-
-
-
Method Detail
-
visitValueLiteral
public R visitValueLiteral(ValueLiteralNode n, P p)
-
visitShortLiteral
public R visitShortLiteral(ShortLiteralNode n, P p)
- Specified by:
visitShortLiteral
in interfaceNodeVisitor<R,P>
-
visitIntegerLiteral
public R visitIntegerLiteral(IntegerLiteralNode n, P p)
- Specified by:
visitIntegerLiteral
in interfaceNodeVisitor<R,P>
-
visitLongLiteral
public R visitLongLiteral(LongLiteralNode n, P p)
- Specified by:
visitLongLiteral
in interfaceNodeVisitor<R,P>
-
visitFloatLiteral
public R visitFloatLiteral(FloatLiteralNode n, P p)
- Specified by:
visitFloatLiteral
in interfaceNodeVisitor<R,P>
-
visitDoubleLiteral
public R visitDoubleLiteral(DoubleLiteralNode n, P p)
- Specified by:
visitDoubleLiteral
in interfaceNodeVisitor<R,P>
-
visitBooleanLiteral
public R visitBooleanLiteral(BooleanLiteralNode n, P p)
- Specified by:
visitBooleanLiteral
in interfaceNodeVisitor<R,P>
-
visitCharacterLiteral
public R visitCharacterLiteral(CharacterLiteralNode n, P p)
- Specified by:
visitCharacterLiteral
in interfaceNodeVisitor<R,P>
-
visitStringLiteral
public R visitStringLiteral(StringLiteralNode n, P p)
- Specified by:
visitStringLiteral
in interfaceNodeVisitor<R,P>
-
visitNullLiteral
public R visitNullLiteral(NullLiteralNode n, P p)
- Specified by:
visitNullLiteral
in interfaceNodeVisitor<R,P>
-
visitNumericalMinus
public R visitNumericalMinus(NumericalMinusNode n, P p)
- Specified by:
visitNumericalMinus
in interfaceNodeVisitor<R,P>
-
visitNumericalPlus
public R visitNumericalPlus(NumericalPlusNode n, P p)
- Specified by:
visitNumericalPlus
in interfaceNodeVisitor<R,P>
-
visitBitwiseComplement
public R visitBitwiseComplement(BitwiseComplementNode n, P p)
- Specified by:
visitBitwiseComplement
in interfaceNodeVisitor<R,P>
-
visitNullChk
public R visitNullChk(NullChkNode n, P p)
- Specified by:
visitNullChk
in interfaceNodeVisitor<R,P>
-
visitStringConcatenate
public R visitStringConcatenate(StringConcatenateNode n, P p)
- Specified by:
visitStringConcatenate
in interfaceNodeVisitor<R,P>
-
visitNumericalAddition
public R visitNumericalAddition(NumericalAdditionNode n, P p)
- Specified by:
visitNumericalAddition
in interfaceNodeVisitor<R,P>
-
visitNumericalSubtraction
public R visitNumericalSubtraction(NumericalSubtractionNode n, P p)
- Specified by:
visitNumericalSubtraction
in interfaceNodeVisitor<R,P>
-
visitNumericalMultiplication
public R visitNumericalMultiplication(NumericalMultiplicationNode n, P p)
- Specified by:
visitNumericalMultiplication
in interfaceNodeVisitor<R,P>
-
visitIntegerDivision
public R visitIntegerDivision(IntegerDivisionNode n, P p)
- Specified by:
visitIntegerDivision
in interfaceNodeVisitor<R,P>
-
visitFloatingDivision
public R visitFloatingDivision(FloatingDivisionNode n, P p)
- Specified by:
visitFloatingDivision
in interfaceNodeVisitor<R,P>
-
visitIntegerRemainder
public R visitIntegerRemainder(IntegerRemainderNode n, P p)
- Specified by:
visitIntegerRemainder
in interfaceNodeVisitor<R,P>
-
visitFloatingRemainder
public R visitFloatingRemainder(FloatingRemainderNode n, P p)
- Specified by:
visitFloatingRemainder
in interfaceNodeVisitor<R,P>
-
visitLeftShift
public R visitLeftShift(LeftShiftNode n, P p)
- Specified by:
visitLeftShift
in interfaceNodeVisitor<R,P>
-
visitSignedRightShift
public R visitSignedRightShift(SignedRightShiftNode n, P p)
- Specified by:
visitSignedRightShift
in interfaceNodeVisitor<R,P>
-
visitUnsignedRightShift
public R visitUnsignedRightShift(UnsignedRightShiftNode n, P p)
- Specified by:
visitUnsignedRightShift
in interfaceNodeVisitor<R,P>
-
visitBitwiseAnd
public R visitBitwiseAnd(BitwiseAndNode n, P p)
- Specified by:
visitBitwiseAnd
in interfaceNodeVisitor<R,P>
-
visitBitwiseOr
public R visitBitwiseOr(BitwiseOrNode n, P p)
- Specified by:
visitBitwiseOr
in interfaceNodeVisitor<R,P>
-
visitBitwiseXor
public R visitBitwiseXor(BitwiseXorNode n, P p)
- Specified by:
visitBitwiseXor
in interfaceNodeVisitor<R,P>
-
visitLessThan
public R visitLessThan(LessThanNode n, P p)
- Specified by:
visitLessThan
in interfaceNodeVisitor<R,P>
-
visitLessThanOrEqual
public R visitLessThanOrEqual(LessThanOrEqualNode n, P p)
- Specified by:
visitLessThanOrEqual
in interfaceNodeVisitor<R,P>
-
visitGreaterThan
public R visitGreaterThan(GreaterThanNode n, P p)
- Specified by:
visitGreaterThan
in interfaceNodeVisitor<R,P>
-
visitGreaterThanOrEqual
public R visitGreaterThanOrEqual(GreaterThanOrEqualNode n, P p)
- Specified by:
visitGreaterThanOrEqual
in interfaceNodeVisitor<R,P>
-
visitEqualTo
public R visitEqualTo(EqualToNode n, P p)
- Specified by:
visitEqualTo
in interfaceNodeVisitor<R,P>
-
visitNotEqual
public R visitNotEqual(NotEqualNode n, P p)
- Specified by:
visitNotEqual
in interfaceNodeVisitor<R,P>
-
visitConditionalAnd
public R visitConditionalAnd(ConditionalAndNode n, P p)
- Specified by:
visitConditionalAnd
in interfaceNodeVisitor<R,P>
-
visitConditionalOr
public R visitConditionalOr(ConditionalOrNode n, P p)
- Specified by:
visitConditionalOr
in interfaceNodeVisitor<R,P>
-
visitConditionalNot
public R visitConditionalNot(ConditionalNotNode n, P p)
- Specified by:
visitConditionalNot
in interfaceNodeVisitor<R,P>
-
visitTernaryExpression
public R visitTernaryExpression(TernaryExpressionNode n, P p)
- Specified by:
visitTernaryExpression
in interfaceNodeVisitor<R,P>
-
visitSwitchExpressionNode
public R visitSwitchExpressionNode(SwitchExpressionNode n, P p)
- Specified by:
visitSwitchExpressionNode
in interfaceNodeVisitor<R,P>
-
visitAssignment
public R visitAssignment(AssignmentNode n, P p)
- Specified by:
visitAssignment
in interfaceNodeVisitor<R,P>
-
visitLocalVariable
public R visitLocalVariable(LocalVariableNode n, P p)
- Specified by:
visitLocalVariable
in interfaceNodeVisitor<R,P>
-
visitVariableDeclaration
public R visitVariableDeclaration(VariableDeclarationNode n, P p)
- Specified by:
visitVariableDeclaration
in interfaceNodeVisitor<R,P>
-
visitFieldAccess
public R visitFieldAccess(FieldAccessNode n, P p)
- Specified by:
visitFieldAccess
in interfaceNodeVisitor<R,P>
-
visitMethodAccess
public R visitMethodAccess(MethodAccessNode n, P p)
- Specified by:
visitMethodAccess
in interfaceNodeVisitor<R,P>
-
visitArrayAccess
public R visitArrayAccess(ArrayAccessNode n, P p)
- Specified by:
visitArrayAccess
in interfaceNodeVisitor<R,P>
-
visitImplicitThis
public R visitImplicitThis(ImplicitThisNode n, P p)
- Specified by:
visitImplicitThis
in interfaceNodeVisitor<R,P>
-
visitExplicitThis
public R visitExplicitThis(ExplicitThisNode n, P p)
- Specified by:
visitExplicitThis
in interfaceNodeVisitor<R,P>
-
visitSuper
public R visitSuper(SuperNode n, P p)
- Specified by:
visitSuper
in interfaceNodeVisitor<R,P>
-
visitReturn
public R visitReturn(ReturnNode n, P p)
- Specified by:
visitReturn
in interfaceNodeVisitor<R,P>
-
visitLambdaResultExpression
public R visitLambdaResultExpression(LambdaResultExpressionNode n, P p)
- Specified by:
visitLambdaResultExpression
in interfaceNodeVisitor<R,P>
-
visitStringConversion
public R visitStringConversion(StringConversionNode n, P p)
- Specified by:
visitStringConversion
in interfaceNodeVisitor<R,P>
-
visitWideningConversion
public R visitWideningConversion(WideningConversionNode n, P p)
- Specified by:
visitWideningConversion
in interfaceNodeVisitor<R,P>
-
visitNarrowingConversion
public R visitNarrowingConversion(NarrowingConversionNode n, P p)
- Specified by:
visitNarrowingConversion
in interfaceNodeVisitor<R,P>
-
visitInstanceOf
public R visitInstanceOf(InstanceOfNode n, P p)
- Specified by:
visitInstanceOf
in interfaceNodeVisitor<R,P>
-
visitTypeCast
public R visitTypeCast(TypeCastNode n, P p)
- Specified by:
visitTypeCast
in interfaceNodeVisitor<R,P>
-
visitAssertionError
public R visitAssertionError(AssertionErrorNode n, P p)
- Specified by:
visitAssertionError
in interfaceNodeVisitor<R,P>
-
visitSynchronized
public R visitSynchronized(SynchronizedNode n, P p)
- Specified by:
visitSynchronized
in interfaceNodeVisitor<R,P>
-
visitThrow
public R visitThrow(ThrowNode n, P p)
- Specified by:
visitThrow
in interfaceNodeVisitor<R,P>
-
visitCase
public R visitCase(CaseNode n, P p)
- Specified by:
visitCase
in interfaceNodeVisitor<R,P>
-
visitMethodInvocation
public R visitMethodInvocation(MethodInvocationNode n, P p)
- Specified by:
visitMethodInvocation
in interfaceNodeVisitor<R,P>
-
visitObjectCreation
public R visitObjectCreation(ObjectCreationNode n, P p)
- Specified by:
visitObjectCreation
in interfaceNodeVisitor<R,P>
-
visitClassDeclaration
public R visitClassDeclaration(ClassDeclarationNode n, P p)
Description copied from interface:NodeVisitor
Visits an anonymous/inner/nested class declaration within a method.- Specified by:
visitClassDeclaration
in interfaceNodeVisitor<R,P>
- Parameters:
n
- theClassDeclarationNode
to be visitedp
- the argument for the operation implemented by this visitor- Returns:
- the return value of the operation implemented by this visitor
-
visitMemberReference
public R visitMemberReference(FunctionalInterfaceNode n, P p)
- Specified by:
visitMemberReference
in interfaceNodeVisitor<R,P>
-
visitArrayCreation
public R visitArrayCreation(ArrayCreationNode n, P p)
- Specified by:
visitArrayCreation
in interfaceNodeVisitor<R,P>
-
visitArrayType
public R visitArrayType(ArrayTypeNode n, P p)
- Specified by:
visitArrayType
in interfaceNodeVisitor<R,P>
-
visitPrimitiveType
public R visitPrimitiveType(PrimitiveTypeNode n, P p)
- Specified by:
visitPrimitiveType
in interfaceNodeVisitor<R,P>
-
visitClassName
public R visitClassName(ClassNameNode n, P p)
- Specified by:
visitClassName
in interfaceNodeVisitor<R,P>
-
visitPackageName
public R visitPackageName(PackageNameNode n, P p)
- Specified by:
visitPackageName
in interfaceNodeVisitor<R,P>
-
visitParameterizedType
public R visitParameterizedType(ParameterizedTypeNode n, P p)
- Specified by:
visitParameterizedType
in interfaceNodeVisitor<R,P>
-
visitMarker
public R visitMarker(MarkerNode n, P p)
- Specified by:
visitMarker
in interfaceNodeVisitor<R,P>
-
visitExpressionStatement
public R visitExpressionStatement(ExpressionStatementNode n, P p)
Description copied from interface:NodeVisitor
Visits an expression that is used as a statement. This node is a marker after the expression node(s).- Specified by:
visitExpressionStatement
in interfaceNodeVisitor<R,P>
- Parameters:
n
- theExpressionStatementNode
to be visitedp
- the argument for the operation implemented by this visitor- Returns:
- the return value of the operation implemented by this visitor
-
visitDeconstructorPattern
public R visitDeconstructorPattern(DeconstructorPatternNode n, P p)
Description copied from interface:NodeVisitor
Visits a deconstructor pattern node.- Specified by:
visitDeconstructorPattern
in interfaceNodeVisitor<R,P>
- Parameters:
n
- theDeconstructorPatternNode
to be visitedp
- the argument for the operation implemented by this visitor- Returns:
- the return value of the operation implemented by this visitor
-
-