Class JointJavacJavaParserVisitor

java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
org.checkerframework.framework.ajava.JointJavacJavaParserVisitor
All Implemented Interfaces:
TreeVisitor<Void,com.github.javaparser.ast.Node>
Direct Known Subclasses:
DefaultJointVisitor, JointVisitorWithDefaultAction

public abstract class JointJavacJavaParserVisitor extends SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
A visitor that processes javac trees and JavaParser nodes simultaneously, matching corresponding nodes.

By default, visits all children of a javac tree along with corresponding JavaParser nodes. The JavaParser node corresponding to a javac tree is always passed as the secondary parameter to the visit methods.

To perform an action on a particular tree type, override one of the methods starting with "process". For each javac tree type JavacType, and for each possible JavaParser node type JavaParserNode that it may be matched to, this class contains a method processJavacType(JavacTypeTree javacTree, JavaParserNode javaParserNode). These are named after the visit methods in com.sun.source.tree.TreeVisitor, but for each javac tree type there may be multiple process methods for each possible node type it could be matched to.

The process methods are called in pre-order. That is, process methods for a parent are called before its children.

  • Constructor Details

    • JointJavacJavaParserVisitor

      public JointJavacJavaParserVisitor()
  • Method Details

    • visitAnnotation

      public Void visitAnnotation(AnnotationTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitAnnotation in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitAnnotation in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitAnnotatedType

      public Void visitAnnotatedType(AnnotatedTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitAnnotatedType in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitAnnotatedType in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitArrayAccess

      public Void visitArrayAccess(ArrayAccessTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitArrayAccess in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitArrayAccess in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitArrayType

      public Void visitArrayType(ArrayTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitArrayType in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitArrayType in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitAssert

      public Void visitAssert(AssertTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitAssert in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitAssert in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitAssignment

      public Void visitAssignment(AssignmentTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitAssignment in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitAssignment in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitBinary

      public Void visitBinary(BinaryTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitBinary in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitBinary in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitBindingPattern17

      public Void visitBindingPattern17(Tree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Visit a BindingPatternTree.
      Parameters:
      javacTree - a BindingPatternTree, typed as Tree to be backward-compatible
      javaParserNode - a PatternExpr
      Returns:
      nothing
    • visitBlock

      public Void visitBlock(BlockTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitBlock in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitBlock in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • isDefaultSuperConstructorCall

      public static boolean isDefaultSuperConstructorCall(StatementTree statement)
      Returns whether a javac statement represents a method call super().
      Parameters:
      statement - the javac statement to check
      Returns:
      true if statement is a method invocation named "super" with no arguments, false otherwise
    • visitBreak

      public Void visitBreak(BreakTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitBreak in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitBreak in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitCase

      public Void visitCase(CaseTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitCase in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitCase in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitCatch

      public Void visitCatch(CatchTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitCatch in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitCatch in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitClass

      public Void visitClass(ClassTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitClass in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitClass in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitAnonymousClassBody

      public void visitAnonymousClassBody(ClassTree javacBody, List<com.github.javaparser.ast.body.BodyDeclaration<?>> javaParserMembers)
      Visits the members of an anonymous class body.

      In normal classes, javac inserts a synthetic no-argument constructor if no constructor is explicitly defined, which is skipped when visiting members. Anonymous class bodies may introduce constructors that take arguments if the constructor invocation that created them was passed arguments. For example, if MyClass has a constructor taking a single integer argument, then writing new MyClass(5) { } expands to the javac tree

      
       new MyClass(5) {
           (int arg) {
               super(arg);
           }
       }
       

      This method skips these synthetic constructors.

      Parameters:
      javacBody - body of an anonymous class body
      javaParserMembers - list of members for the anonymous class body of an ObjectCreationExpr
    • isNoArgumentConstructor

      public static boolean isNoArgumentConstructor(Tree member)
      Returns whether member is a javac constructor declaration that takes no arguments.
      Parameters:
      member - the javac tree to check
      Returns:
      true if member is a method declaration with name <init> that takes no arguments
    • visitCompilationUnit

      public Void visitCompilationUnit(CompilationUnitTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitCompilationUnit in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitCompilationUnit in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitCompoundAssignment

      public Void visitCompoundAssignment(CompoundAssignmentTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitCompoundAssignment in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitCompoundAssignment in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitConditionalExpression

      public Void visitConditionalExpression(ConditionalExpressionTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitConditionalExpression in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitConditionalExpression in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitContinue

      public Void visitContinue(ContinueTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitContinue in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitContinue in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitDoWhileLoop

      public Void visitDoWhileLoop(DoWhileLoopTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitDoWhileLoop in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitDoWhileLoop in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitEmptyStatement

      public Void visitEmptyStatement(EmptyStatementTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitEmptyStatement in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitEmptyStatement in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitEnhancedForLoop

      public Void visitEnhancedForLoop(EnhancedForLoopTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitEnhancedForLoop in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitEnhancedForLoop in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitErroneous

      public Void visitErroneous(ErroneousTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitErroneous in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitErroneous in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitExports

      public Void visitExports(ExportsTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitExports in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitExports in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitExpressionStatement

      public Void visitExpressionStatement(ExpressionStatementTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitExpressionStatement in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitExpressionStatement in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitForLoop

      public Void visitForLoop(ForLoopTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitForLoop in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitForLoop in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitIdentifier

      public Void visitIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitIdentifier in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitIdentifier in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitIf

      public Void visitIf(IfTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitIf in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitIf in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitImport

      public Void visitImport(ImportTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitImport in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitImport in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitInstanceOf

      public Void visitInstanceOf(InstanceOfTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitInstanceOf in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitInstanceOf in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitIntersectionType

      public Void visitIntersectionType(IntersectionTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitIntersectionType in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitIntersectionType in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitLabeledStatement

      public Void visitLabeledStatement(LabeledStatementTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitLabeledStatement in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitLabeledStatement in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitLambdaExpression

      public Void visitLambdaExpression(LambdaExpressionTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitLambdaExpression in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitLambdaExpression in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitLiteral

      public Void visitLiteral(LiteralTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitLiteral in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitLiteral in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitMemberReference

      public Void visitMemberReference(MemberReferenceTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitMemberReference in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitMemberReference in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitMemberSelect

      public Void visitMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitMemberSelect in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitMemberSelect in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitMethod

      public Void visitMethod(MethodTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitMethod in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitMethod in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitMethodInvocation

      public Void visitMethodInvocation(MethodInvocationTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitMethodInvocation in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitMethodInvocation in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitModifiers

      public Void visitModifiers(ModifiersTree arg0, com.github.javaparser.ast.Node arg1)
      Specified by:
      visitModifiers in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitModifiers in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitModule

      public Void visitModule(ModuleTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitModule in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitModule in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitNewArray

      public Void visitNewArray(NewArrayTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitNewArray in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitNewArray in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitNewClass

      public Void visitNewClass(NewClassTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitNewClass in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitNewClass in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitOpens

      public Void visitOpens(OpensTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitOpens in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitOpens in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitOther

      public Void visitOther(Tree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitOther in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitOther in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitPackage

      public Void visitPackage(PackageTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitPackage in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitPackage in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitParameterizedType

      public Void visitParameterizedType(ParameterizedTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitParameterizedType in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitParameterizedType in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitParenthesized

      public Void visitParenthesized(ParenthesizedTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitParenthesized in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitParenthesized in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitPrimitiveType

      public Void visitPrimitiveType(PrimitiveTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitPrimitiveType in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitPrimitiveType in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitProvides

      public Void visitProvides(ProvidesTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitProvides in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitProvides in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitRequires

      public Void visitRequires(RequiresTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitRequires in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitRequires in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitReturn

      public Void visitReturn(ReturnTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitReturn in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitReturn in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitSwitch

      public Void visitSwitch(SwitchTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitSwitch in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitSwitch in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitSwitchExpression17

      public Void visitSwitchExpression17(Tree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Visit a switch expression.
      Parameters:
      javacTree - switch expression tree
      javaParserNode - a JavaParser node
      Returns:
      null
    • visitSynchronized

      public Void visitSynchronized(SynchronizedTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitSynchronized in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitSynchronized in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitThrow

      public Void visitThrow(ThrowTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitThrow in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitThrow in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitTry

      public Void visitTry(TryTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitTry in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitTry in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitTypeCast

      public Void visitTypeCast(TypeCastTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitTypeCast in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitTypeCast in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitTypeParameter

      public Void visitTypeParameter(TypeParameterTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitTypeParameter in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitTypeParameter in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitUnary

      public Void visitUnary(UnaryTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitUnary in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitUnary in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitUnionType

      public Void visitUnionType(UnionTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitUnionType in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitUnionType in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitUses

      public Void visitUses(UsesTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitUses in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitUses in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitVariable

      public Void visitVariable(VariableTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitVariable in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitVariable in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitWhileLoop

      public Void visitWhileLoop(WhileLoopTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitWhileLoop in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitWhileLoop in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitWildcard

      public Void visitWildcard(WildcardTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Specified by:
      visitWildcard in interface TreeVisitor<Void,com.github.javaparser.ast.Node>
      Overrides:
      visitWildcard in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
    • visitYield17

      public Void visitYield17(Tree tree, com.github.javaparser.ast.Node node)
      Visit a YieldTree
      Parameters:
      tree - a YieldTree, typed as Tree to be backward-compatible
      node - a YieldStmt, typed as Node to be backward-compatible
      Returns:
      nothing
    • processAnnotation

      public abstract void processAnnotation(AnnotationTree javacTree, com.github.javaparser.ast.expr.NormalAnnotationExpr javaParserNode)
      Process an AnnotationTree with multiple key-value pairs like @MyAnno(a=5, b=10).
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processAnnotation

      public abstract void processAnnotation(AnnotationTree javacTree, com.github.javaparser.ast.expr.MarkerAnnotationExpr javaParserNode)
      Process an AnnotationTree with no arguments like @MyAnno.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processAnnotation

      public abstract void processAnnotation(AnnotationTree javacTree, com.github.javaparser.ast.expr.SingleMemberAnnotationExpr javaParserNode)
      Process an AnnotationTree with a single argument like MyAnno(5).
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processAnnotatedType

      public abstract void processAnnotatedType(AnnotatedTypeTree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Process an AnnotatedTypeTree.

      In javac, a type with an annotation is represented as an AnnotatedTypeTree with a nested tree for the base type whereas in JavaParser the annotations are store directly on the node for the base type. As a result, the JavaParser base type node will be processed twice, once with the AnnotatedTypeTree and once with the tree for the base type.

      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processArrayAccess

      public abstract void processArrayAccess(ArrayAccessTree javacTree, com.github.javaparser.ast.expr.ArrayAccessExpr javaParserNode)
      Process an ArrayAccessTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processArrayType

      public abstract void processArrayType(ArrayTypeTree javacTree, com.github.javaparser.ast.type.ArrayType javaParserNode)
      Process an ArrayTypeTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processAssert

      public abstract void processAssert(AssertTree javacTree, com.github.javaparser.ast.stmt.AssertStmt javaParserNode)
      Process an AssertTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processAssignment

      public abstract void processAssignment(AssignmentTree javacTree, com.github.javaparser.ast.expr.AssignExpr javaParserNode)
      Process an AssignmentTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processBinary

      public abstract void processBinary(BinaryTree javacTree, com.github.javaparser.ast.expr.BinaryExpr javaParserNode)
      Process a BinaryTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processBindingPattern

      public abstract void processBindingPattern(Tree javacTree, com.github.javaparser.ast.expr.PatternExpr javaParserNode)
      Process a BindingPatternTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processBlock

      public abstract void processBlock(BlockTree javacTree, com.github.javaparser.ast.stmt.BlockStmt javaParserNode)
      Process a BlockTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processBreak

      public abstract void processBreak(BreakTree javacTree, com.github.javaparser.ast.stmt.BreakStmt javaParserNode)
      Process a BreakTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processCase

      public abstract void processCase(CaseTree javacTree, com.github.javaparser.ast.stmt.SwitchEntry javaParserNode)
      Process a CaseTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processCatch

      public abstract void processCatch(CatchTree javacTree, com.github.javaparser.ast.stmt.CatchClause javaParserNode)
      Process a CatchTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processClass

      public abstract void processClass(ClassTree javacTree, com.github.javaparser.ast.body.AnnotationDeclaration javaParserNode)
      Process a ClassTree representing an annotation declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processClass

      public abstract void processClass(ClassTree javacTree, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration javaParserNode)
      Process a ClassTree representing a class or interface declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processClass

      public abstract void processClass(ClassTree javacTree, com.github.javaparser.ast.body.RecordDeclaration javaParserNode)
      Process a ClassTree representing a record declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processClass

      public abstract void processClass(ClassTree javacTree, com.github.javaparser.ast.body.EnumDeclaration javaParserNode)
      Process a ClassTree representing an enum declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processCompilationUnit

      public abstract void processCompilationUnit(CompilationUnitTree javacTree, com.github.javaparser.ast.CompilationUnit javaParserNode)
      Process a CompilationUnitTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processConditionalExpression

      public abstract void processConditionalExpression(ConditionalExpressionTree javacTree, com.github.javaparser.ast.expr.ConditionalExpr javaParserNode)
      Process a ConditionalExpressionTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processContinue

      public abstract void processContinue(ContinueTree javacTree, com.github.javaparser.ast.stmt.ContinueStmt javaParserNode)
      Process a ContinueTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processDoWhileLoop

      public abstract void processDoWhileLoop(DoWhileLoopTree javacTree, com.github.javaparser.ast.stmt.DoStmt javaParserNode)
      Process a DoWhileLoopTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processEmptyStatement

      public abstract void processEmptyStatement(EmptyStatementTree javacTree, com.github.javaparser.ast.stmt.EmptyStmt javaParserNode)
      Process an EmptyStatementTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processEnhancedForLoop

      public abstract void processEnhancedForLoop(EnhancedForLoopTree javacTree, com.github.javaparser.ast.stmt.ForEachStmt javaParserNode)
      Process an EnhancedForLoopTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processExports

      public abstract void processExports(ExportsTree javacTree, com.github.javaparser.ast.modules.ModuleExportsDirective javaParserNode)
      Process an ExportsTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processExpressionStatemen

      public abstract void processExpressionStatemen(ExpressionStatementTree javacTree, com.github.javaparser.ast.stmt.ExpressionStmt javaParserNode)
      Process an ExpressionStatementTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processForLoop

      public abstract void processForLoop(ForLoopTree javacTree, com.github.javaparser.ast.stmt.ForStmt javaParserNode)
      Process a ForLoopTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIdentifier

      public abstract void processIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.type.ClassOrInterfaceType javaParserNode)
      Process an IdentifierTree representing a class or interface type.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIdentifier

      public abstract void processIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.expr.Name javaParserNode)
      Process an IdentifierTree representing a name that may contain dots.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIdentifier

      public abstract void processIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.expr.NameExpr javaParserNode)
      Process an IdentifierTree representing an expression that evaluates to the value of a variable.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIdentifier

      public abstract void processIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.expr.SimpleName javaParserNode)
      Process an IdentifierTree representing a name without dots.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIdentifier

      public abstract void processIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.expr.SuperExpr javaParserNode)
      Process an IdentifierTree representing a super expression like the super in super.myMethod() or MyClass.super.myMethod().
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIdentifier

      public abstract void processIdentifier(IdentifierTree javacTree, com.github.javaparser.ast.expr.ThisExpr javaParserNode)
      Process an IdentifierTree representing a this expression like the this in MyClass = this, this.myMethod(), or MyClass.this.myMethod().
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIf

      public abstract void processIf(IfTree javacTree, com.github.javaparser.ast.stmt.IfStmt javaParserNode)
      Process an IfTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processImport

      public abstract void processImport(ImportTree javacTree, com.github.javaparser.ast.ImportDeclaration javaParserNode)
      Process an ImportTree.

      Wildcards are stored differently between the two. In a statement like import a.*;, the name is stored as a MemberSelectTree with a and *. In JavaParser this is just stored as a but with a method that returns whether it has a wildcard.

      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processInstanceOf

      public abstract void processInstanceOf(InstanceOfTree javacTree, com.github.javaparser.ast.expr.InstanceOfExpr javaParserNode)
      Process an InstanceOfTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processIntersectionType

      public abstract void processIntersectionType(IntersectionTypeTree javacTree, com.github.javaparser.ast.type.IntersectionType javaParserNode)
      Process an IntersectionType.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processLabeledStatement

      public abstract void processLabeledStatement(LabeledStatementTree javacTree, com.github.javaparser.ast.stmt.LabeledStmt javaParserNode)
      Process a LabeledStatement.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processLambdaExpression

      public abstract void processLambdaExpression(LambdaExpressionTree javacTree, com.github.javaparser.ast.expr.LambdaExpr javaParserNode)
      Process a LambdaExpressionTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processLiteral

      public abstract void processLiteral(LiteralTree javacTree, com.github.javaparser.ast.expr.BinaryExpr javaParserNode)
      Process a LiteralTree for a String literal defined using concatenation.

      For an expression like "a" + "b", javac stores a single String literal "ab" but JavaParser stores it as an operation with two operands.

      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processLiteral

      public abstract void processLiteral(LiteralTree javacTree, com.github.javaparser.ast.expr.UnaryExpr javaParserNode)
      Process a LiteralTree for a literal expression prefixed with + or - like +5 or -2.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processLiteral

      public abstract void processLiteral(LiteralTree javacTree, com.github.javaparser.ast.expr.LiteralExpr javaParserNode)
      Process a LiteralTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberReference

      public abstract void processMemberReference(MemberReferenceTree javacTree, com.github.javaparser.ast.expr.MethodReferenceExpr javaParserNode)
      Process a MemberReferenceTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberSelect

      public abstract void processMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.expr.ClassExpr javaParserNode)
      Process a MemberSelectTree for a class expression like MyClass.class.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberSelect

      public abstract void processMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.type.ClassOrInterfaceType javaParserNode)
      Process a MemberSelectTree for a type with a name containing dots, like mypackage.MyClass.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberSelect

      public abstract void processMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.expr.FieldAccessExpr javaParserNode)
      Process a MemberSelectTree for a field access expression like myObj.myField.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberSelect

      public abstract void processMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.expr.Name javaParserNode)
      Process a MemberSelectTree for a name that contains dots.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberSelect

      public abstract void processMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.expr.ThisExpr javaParserNode)
      Process a MemberSelectTree for a this expression with a class like MyClass.this.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMemberSelect

      public abstract void processMemberSelect(MemberSelectTree javacTree, com.github.javaparser.ast.expr.SuperExpr javaParserNode)
      Process a MemberSelectTree for a super expression with a class like super.MyClass.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMethod

      public abstract void processMethod(MethodTree javacTree, com.github.javaparser.ast.body.MethodDeclaration javaParserNode)
      Process a MethodTree representing a regular method declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMethod

      public abstract void processMethod(MethodTree javacTree, com.github.javaparser.ast.body.ConstructorDeclaration javaParserNode)
      Process a MethodTree representing a constructor declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMethod

      public abstract void processMethod(MethodTree javacTree, com.github.javaparser.ast.body.CompactConstructorDeclaration javaParserNode)
      Process a MethodTree representing a compact constructor declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMethod

      public abstract void processMethod(MethodTree javacTree, com.github.javaparser.ast.body.AnnotationMemberDeclaration javaParserNode)
      Process a MethodTree representing a value field for an annotation.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMethodInvocation

      public abstract void processMethodInvocation(MethodInvocationTree javacTree, com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt javaParserNode)
      Process a MethodInvocationTree representing a constructor invocation.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processMethodInvocation

      public abstract void processMethodInvocation(MethodInvocationTree javacTree, com.github.javaparser.ast.expr.MethodCallExpr javaParserNode)
      Process a MethodInvocationTree representing a regular method invocation.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processModule

      public abstract void processModule(ModuleTree javacTree, com.github.javaparser.ast.modules.ModuleDeclaration javaParserNode)
      Process a ModuleTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processNewClass

      public abstract void processNewClass(NewClassTree javacTree, com.github.javaparser.ast.expr.ObjectCreationExpr javaParserNode)
      Process a NewClassTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processOpens

      public abstract void processOpens(OpensTree javacTree, com.github.javaparser.ast.modules.ModuleOpensDirective javaParserNode)
      Process an OpensTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processOther

      public abstract void processOther(Tree javacTree, com.github.javaparser.ast.Node javaParserNode)
      Process a Tree that isn't an instance of any specific tree class.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processPackage

      public abstract void processPackage(PackageTree javacTree, com.github.javaparser.ast.PackageDeclaration javaParserNode)
      Process a PackageTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processParameterizedType

      public abstract void processParameterizedType(ParameterizedTypeTree javacTree, com.github.javaparser.ast.type.ClassOrInterfaceType javaParserNode)
      Process a ParameterizedTypeTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processParenthesized

      public abstract void processParenthesized(ParenthesizedTree javacTree, com.github.javaparser.ast.expr.EnclosedExpr javaParserNode)
      Process a ParenthesizedTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processPrimitiveType

      public abstract void processPrimitiveType(PrimitiveTypeTree javacTree, com.github.javaparser.ast.type.PrimitiveType javaParserNode)
      Process a PrimitiveTypeTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processPrimitiveType

      public abstract void processPrimitiveType(PrimitiveTypeTree javacTree, com.github.javaparser.ast.type.VoidType javaParserNode)
      Process a PrimitiveTypeTree representing a void type.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processProvides

      public abstract void processProvides(ProvidesTree javacTree, com.github.javaparser.ast.modules.ModuleProvidesDirective javaParserNode)
      Process a ProvidesTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processRequires

      public abstract void processRequires(RequiresTree javacTree, com.github.javaparser.ast.modules.ModuleRequiresDirective javaParserNode)
      Process a RequiresTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processReturn

      public abstract void processReturn(ReturnTree javacTree, com.github.javaparser.ast.stmt.ReturnStmt javaParserNode)
      Process a RetrunTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processSwitch

      public abstract void processSwitch(SwitchTree javacTree, com.github.javaparser.ast.stmt.SwitchStmt javaParserNode)
      Process a SwitchTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processSwitchExpression

      public abstract void processSwitchExpression(Tree javacTree, com.github.javaparser.ast.expr.SwitchExpr javaParserNode)
      Process a SwitchExpressionTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processSynchronized

      public abstract void processSynchronized(SynchronizedTree javacTree, com.github.javaparser.ast.stmt.SynchronizedStmt javaParserNode)
      Process a SynchronizedTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processThrow

      public abstract void processThrow(ThrowTree javacTree, com.github.javaparser.ast.stmt.ThrowStmt javaParserNode)
      Process a ThrowTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processTry

      public abstract void processTry(TryTree javacTree, com.github.javaparser.ast.stmt.TryStmt javaParserNode)
      Process a TryTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processTypeCast

      public abstract void processTypeCast(TypeCastTree javacTree, com.github.javaparser.ast.expr.CastExpr javaParserNode)
      Process a TypeCastTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processTypeParameter

      public abstract void processTypeParameter(TypeParameterTree javacTree, com.github.javaparser.ast.type.TypeParameter javaParserNode)
      Process a TypeParameterTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processUnary

      public abstract void processUnary(UnaryTree javacTree, com.github.javaparser.ast.expr.UnaryExpr javaParserNode)
      Process a UnaryTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processUnionType

      public abstract void processUnionType(UnionTypeTree javacTree, com.github.javaparser.ast.type.UnionType javaParserNode)
      Process a UnionTypeTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processUses

      public abstract void processUses(UsesTree javacTree, com.github.javaparser.ast.modules.ModuleUsesDirective javaParserNode)
      Process a UsesTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processVariable

      public abstract void processVariable(VariableTree javacTree, com.github.javaparser.ast.body.EnumConstantDeclaration javaParserNode)
      Process a VariableTree representing an enum constant declaration. In an enum like enum MyEnum { MY_CONSTANT }, javac expands MY_CONSTANT as a constant variable.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processVariable

      public abstract void processVariable(VariableTree javacTree, com.github.javaparser.ast.body.Parameter javaParserNode)
      Process a VariableTree representing a parameter to a method or constructor.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processVariable

      public abstract void processVariable(VariableTree javacTree, com.github.javaparser.ast.body.ReceiverParameter javaParserNode)
      Process a VariableTree representing the receiver parameter of a method.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processVariable

      public abstract void processVariable(VariableTree javacTree, com.github.javaparser.ast.body.VariableDeclarator javaParserNode)
      Process a VariableTree representing a regular variable declaration.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processWhileLoop

      public abstract void processWhileLoop(WhileLoopTree javacTree, com.github.javaparser.ast.stmt.WhileStmt javaParserNode)
      Process a WhileLoopTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processWildcard

      public abstract void processWildcard(WildcardTree javacTree, com.github.javaparser.ast.type.WildcardType javaParserNode)
      Process a WhileLoopTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • processYield

      public abstract void processYield(Tree javacTree, com.github.javaparser.ast.stmt.YieldStmt javaParserNode)
      Process a YieldTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding Javaparser node
    • processCompoundAssignment

      public abstract void processCompoundAssignment(CompoundAssignmentTree javacTree, com.github.javaparser.ast.expr.AssignExpr javaParserNode)
      Process a CompoundAssignmentTree.
      Parameters:
      javacTree - tree to process
      javaParserNode - corresponding JavaParser node
    • castNode

      public <T> T castNode(Class<T> type, com.github.javaparser.ast.Node javaParserNode, Tree javacTree)
      Cast javaParserNode to type type and return it.
      Type Parameters:
      T - the type of type
      Parameters:
      type - the type to cast to
      javaParserNode - the object to cast
      javacTree - the javac tree that corresponds to javaParserNode; used only for error reporting
      Returns:
      javaParserNode, casted to type
    • defaultAction

      protected Void defaultAction(Tree tree, com.github.javaparser.ast.Node node)
      The default action for this visitor. This is inherited from SimpleTreeVisitor, but is only called for those methods which do not have an override of the visitXXX method in this class. Ultimately, those are the methods added post Java 11, such as for switch-expressions.
      Overrides:
      defaultAction in class SimpleTreeVisitor<Void,com.github.javaparser.ast.Node>
      Parameters:
      tree - the Javac tree
      node - the Javaparser node
      Returns:
      nothing