Interface NodeWithJavadoc<N extends Node>

All Known Implementing Classes:
AnnotationDeclaration, AnnotationMemberDeclaration, CallableDeclaration, ClassOrInterfaceDeclaration, CompactConstructorDeclaration, ConstructorDeclaration, EnumConstantDeclaration, EnumDeclaration, FieldDeclaration, InitializerDeclaration, MethodDeclaration, RecordDeclaration, TypeDeclaration

public interface NodeWithJavadoc<N extends Node>
A node that can be documented with a Javadoc comment.
  • Method Details

    • getComment

      Optional<Comment> getComment()
    • setComment

      Node setComment(Comment comment)
    • getJavadocComment

      default Optional<JavadocComment> getJavadocComment()
      Gets the JavadocComment for this node. You can set the JavadocComment by calling setJavadocComment passing a JavadocComment.
      Returns:
      The JavadocComment for this node wrapped in an optional as it may be absent.
    • getJavadoc

      default Optional<Javadoc> getJavadoc()
      Gets the Javadoc for this node. You can set the Javadoc by calling setJavadocComment passing a Javadoc.
      Returns:
      The Javadoc for this node wrapped in an optional as it may be absent.
    • setJavadocComment

      default N setJavadocComment(String comment)
      Use this to store additional information to this node.
      Parameters:
      comment - to be set
    • setJavadocComment

      default N setJavadocComment(JavadocComment comment)
    • setJavadocComment

      default N setJavadocComment(String indentation, Javadoc javadoc)
    • setJavadocComment

      default N setJavadocComment(Javadoc javadoc)
    • removeJavaDocComment

      default boolean removeJavaDocComment()
    • hasJavaDocComment

      default boolean hasJavaDocComment()