Class JavadocComment

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

public class JavadocComment extends Comment
A Javadoc comment. /∗∗ a comment ∗/
Author:
Julio Vilmar Gesser
  • Constructor Details

    • JavadocComment

      public JavadocComment()
    • JavadocComment

      public JavadocComment(String content)
    • JavadocComment

      public JavadocComment(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)
    • parse

      public Javadoc parse()
    • clone

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

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

      public boolean isJavadocComment()
      Overrides:
      isJavadocComment in class Comment
    • asJavadocComment

      public JavadocComment asJavadocComment()
      Overrides:
      asJavadocComment in class Comment
    • ifJavadocComment

      public void ifJavadocComment(Consumer<JavadocComment> action)
      Overrides:
      ifJavadocComment in class Comment
    • toJavadocComment

      public Optional<JavadocComment> toJavadocComment()
      Overrides:
      toJavadocComment in class Comment