Class JavaExpressionVisitor<R,P>

java.lang.Object
org.checkerframework.dataflow.expression.JavaExpressionVisitor<R,P>
Type Parameters:
R - the return type of the visit methods
P - the parameter passed to the visit methods
Direct Known Subclasses:
JavaExpressionConverter, JavaExpressionScanner

public abstract class JavaExpressionVisitor<R,P> extends Object
A simple visitor for JavaExpression.
  • Constructor Details

    • JavaExpressionVisitor

      public JavaExpressionVisitor()
  • Method Details

    • visit

      public R visit(JavaExpression javaExpr, P p)
      Visits the given javaExpr.
      Parameters:
      javaExpr - the expression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the expression
    • visitArrayAccess

      protected abstract R visitArrayAccess(ArrayAccess arrayAccessExpr, P p)
      Visit an ArrayAccess.
      Parameters:
      arrayAccessExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the arrayAccessExpr
    • visitArrayCreation

      protected abstract R visitArrayCreation(ArrayCreation arrayCreationExpr, P p)
      Visit an ArrayCreation.
      Parameters:
      arrayCreationExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the arrayCreationExpr
    • visitBinaryOperation

      protected abstract R visitBinaryOperation(BinaryOperation binaryOpExpr, P p)
      Parameters:
      binaryOpExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the binaryOpExpr
    • visitClassName

      protected abstract R visitClassName(ClassName classNameExpr, P p)
      Visit a ClassName.
      Parameters:
      classNameExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the classNameExpr
    • visitFieldAccess

      protected abstract R visitFieldAccess(FieldAccess fieldAccessExpr, P p)
      Visit a FieldAccess.
      Parameters:
      fieldAccessExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the fieldAccessExpr
    • visitFormalParameter

      protected abstract R visitFormalParameter(FormalParameter parameterExpr, P p)
      Parameters:
      parameterExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the parameterExpr
    • visitLocalVariable

      protected abstract R visitLocalVariable(LocalVariable localVarExpr, P p)
      Visit a LocalVariable.
      Parameters:
      localVarExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the localVarExpr
    • visitMethodCall

      protected abstract R visitMethodCall(MethodCall methodCallExpr, P p)
      Visit a MethodCall.
      Parameters:
      methodCallExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the methodCallExpr
    • visitThisReference

      protected abstract R visitThisReference(ThisReference thisExpr, P p)
      Visit a ThisReference.
      Parameters:
      thisExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the thisExpr
    • visitSuperReference

      protected abstract R visitSuperReference(SuperReference superExpr, P p)
      Parameters:
      superExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the superExpr
    • visitUnaryOperation

      protected abstract R visitUnaryOperation(UnaryOperation unaryOpExpr, P p)
      Visit an UnaryOperation.
      Parameters:
      unaryOpExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the unaryOpExpr
    • visitUnknown

      protected abstract R visitUnknown(Unknown unknownExpr, P p)
      Visit an Unknown.
      Parameters:
      unknownExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the unknownExpr
    • visitValueLiteral

      protected abstract R visitValueLiteral(ValueLiteral literalExpr, P p)
      Visit a ValueLiteral.
      Parameters:
      literalExpr - the JavaExpression to visit
      p - the parameter to pass to the visit method
      Returns:
      the result of visiting the literalExpr