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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<Comment>getComment()default Optional<Javadoc>getJavadoc()Gets the Javadoc for this node.default Optional<JavadocComment>getJavadocComment()Gets the JavadocComment for this node.default booleanhasJavaDocComment()default booleanremoveJavaDocComment()NodesetComment(Comment comment)default NsetJavadocComment(JavadocComment comment)default NsetJavadocComment(Javadoc javadoc)default NsetJavadocComment(String comment)Use this to store additional information to this node.default NsetJavadocComment(String indentation, Javadoc javadoc)
-
-
-
Method Detail
-
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)
-
removeJavaDocComment
default boolean removeJavaDocComment()
-
hasJavaDocComment
default boolean hasJavaDocComment()
-
-