Class AjNaiveASTFlattener


public class AjNaiveASTFlattener extends AjASTVisitor
Internal AST visitor for serializing an AST in a quick and dirty fashion. For various reasons the resulting string is not necessarily legal Java code; and even if it is legal Java code, it is not necessarily the string that corresponds to the given AST. Although useless for most purposes, it's fine for generating debug print strings.

Example usage:

 
    NaiveASTFlattener p = new NaiveASTFlattener();
    node.accept(p);
    String result = p.getResult();
 
 

Call the reset method to clear the previous result before reusing an existing instance.

Since:
2.0
  • Field Details

    • buffer

      protected StringBuffer buffer
      The string buffer into which the serialized representation of the AST is written.
  • Constructor Details

    • AjNaiveASTFlattener

      public AjNaiveASTFlattener()
      Creates a new AST printer.
  • Method Details

    • getResult

      public String getResult()
      Returns the string accumulated in the visit.
      Returns:
      the serialized
    • reset

      public void reset()
      Resets this printer so that it can be used again.
    • visit

      public boolean visit(AnnotationTypeDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(AnnotationTypeMemberDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(AnonymousClassDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ArrayAccess node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ArrayCreation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ArrayInitializer node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ArrayType node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(AssertStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(Assignment node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(Block node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(BlockComment node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Note: LineComment and BlockComment nodes are not considered part of main structure of the AST. This method will only be called if a client goes out of their way to visit this kind of node explicitly.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(BooleanLiteral node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(BreakStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(CastExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(CatchClause node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(CharacterLiteral node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ClassInstanceCreation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(CompilationUnit node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ConditionalExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ConstructorInvocation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ContinueStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(DoStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(EmptyStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(EnhancedForStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(PointcutDeclaration node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(EnumConstantDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(EnumDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ExpressionStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(FieldAccess node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(FieldDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ForStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(IfStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ImportDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(InfixExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(InstanceofExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(Initializer node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(Javadoc node)
      Description copied from class: ASTVisitor
      Visits the given AST node.

      Unlike other node types, the boolean returned by the default implementation is controlled by a constructor-supplied parameter ASTVisitor(boolean) which is false by default. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
      See Also:
      ASTVisitor(), ASTVisitor(boolean)
    • visit

      public boolean visit(LabeledStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(LineComment node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Note: LineComment and BlockComment nodes are not considered part of main structure of the AST. This method will only be called if a client goes out of their way to visit this kind of node explicitly.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MarkerAnnotation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MemberRef node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MemberValuePair node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MethodRef node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MethodRefParameter node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MethodDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(MethodInvocation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(Modifier node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(NormalAnnotation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(NullLiteral node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(NumberLiteral node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(PackageDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ParameterizedType node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ParenthesizedExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(PostfixExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(PrefixExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(PrimitiveType node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(QualifiedName node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(QualifiedType node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ReturnStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SimpleName node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SimpleType node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SingleMemberAnnotation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SingleVariableDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(StringLiteral node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SuperConstructorInvocation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SuperFieldAccess node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SuperMethodInvocation node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SwitchCase node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SwitchStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(SynchronizedStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TagElement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TextElement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ThisExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(ThrowStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TryStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TypeDeclaration node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TypeDeclarationStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TypeLiteral node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(TypeParameter node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(VariableDeclarationExpression node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(VariableDeclarationFragment node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(VariableDeclarationStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(WildcardType node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(WhileStatement node)
      Description copied from class: ASTVisitor
      Visits the given type-specific AST node.

      The default implementation does nothing and return true. Subclasses may reimplement.

      Overrides:
      visit in class ASTVisitor
      Parameters:
      node - the node to visit
      Returns:
      true if the children of this node should be visited, and false if the children of this node should be skipped
    • visit

      public boolean visit(DeclareParentsDeclaration node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(DeclareWarningDeclaration node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(DeclareErrorDeclaration node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(DeclareSoftDeclaration node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(DeclarePrecedenceDeclaration node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(AbstractBooleanTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(AnyTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(AnyWithAnnotationTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(EllipsisTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(HasMemberTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(IdentifierTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(NotTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(NoTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(TypeCategoryTypePattern node)
      Overrides:
      visit in class AjASTVisitor
    • visit

      public boolean visit(DefaultPointcut node)
      Overrides:
      visit in class AjASTVisitor