Class BlockComment

All Implemented Interfaces:
NodeWithRange<Node>, NodeWithTokenRange<Node>, Observable, Visitable, HasParentNode<Node>, Cloneable

public class BlockComment extends Comment

AST node that represent block comments.

Block comments can has multi lines and are delimited by "/*" and "*/".
Author:
Julio Vilmar Gesser
  • Constructor Details

    • BlockComment

      public BlockComment()
    • BlockComment

      public BlockComment(String content)
    • BlockComment

      public BlockComment(TokenRange tokenRange, String content)
      This constructor is used by the parser and is considered private.
  • Method Details

    • accept

      public <R,​ A> R accept(GenericVisitor<R,​A> v, A arg)
      Description copied from interface: Visitable
      Accept method for visitor support.
      Type Parameters:
      R - the type of the return value of the visitor
      A - the type the user argument passed to the visitor
      Parameters:
      v - the visitor implementation
      arg - the argument passed to the visitor (of type A)
      Returns:
      the result of the visit (of type R)
    • accept

      public <A> void accept(VoidVisitor<A> v, A arg)
      Description copied from interface: Visitable
      Accept method for visitor support.
      Type Parameters:
      A - the type the argument passed for the visitor
      Parameters:
      v - the visitor implementation
      arg - any value relevant for the visitor (of type A)
    • clone

      public BlockComment clone()
      Overrides:
      clone in class Comment
    • getMetaModel

      public BlockCommentMetaModel getMetaModel()
      Overrides:
      getMetaModel in class Comment
      Returns:
      get JavaParser specific node introspection information.
    • isBlockComment

      public boolean isBlockComment()
      Overrides:
      isBlockComment in class Comment
    • asBlockComment

      public BlockComment asBlockComment()
      Overrides:
      asBlockComment in class Comment
    • ifBlockComment

      public void ifBlockComment(Consumer<BlockComment> action)
      Overrides:
      ifBlockComment in class Comment
    • toBlockComment

      public Optional<BlockComment> toBlockComment()
      Overrides:
      toBlockComment in class Comment