public interface DocTreeFactory
DocTree nodes.DocTree nodes that have been created by the same implementation.| Modifier and Type | Method | Description |
|---|---|---|
DocTreeFactory |
at |
Sets the position to be recorded in subsequent tree nodes created by this factory. |
List |
getFirstSentence |
Gets the first sentence contained in a list of content. |
AttributeTree |
newAttributeTree |
Creates a new AttributeTree object, to represent an attribute in an HTML element or tag. |
AuthorTree |
newAuthorTree |
Creates a new AuthorTree object, to represent an @author tag. |
LiteralTree |
newCodeTree |
Creates a new LiteralTree object, to represent a {@code } tag. |
CommentTree |
newCommentTree |
Creates a new CommentTree, to represent an HTML comment. |
DeprecatedTree |
newDeprecatedTree |
Creates a new DeprecatedTree object, to represent an @deprecated tag. |
DocCommentTree |
newDocCommentTree |
Creates a new DocCommentTree object, to represent a complete doc comment. |
DocCommentTree |
newDocCommentTree |
Creates a new DocCommentTree object, to represent the entire doc comment. |
DocRootTree |
newDocRootTree() |
Creates a new DocRootTree object, to represent an {@docRoot} tag. |
DocTypeTree |
newDocTypeTree |
Creates a new DocTypeTree, to represent a DOCTYPE HTML declaration. |
EndElementTree |
newEndElementTree |
Creates a new EndElement object, to represent the end of an HTML element. |
EntityTree |
newEntityTree |
Creates a new EntityTree object, to represent an HTML entity. |
ErroneousTree |
newErroneousTree |
Creates a new ErroneousTree object, to represent some unparseable input. |
EscapeTree |
newEscapeTree |
Creates a new EscapeTree object, to represent an escaped character. |
ThrowsTree |
newExceptionTree |
Creates a new ThrowsTree object, to represent an @exception tag. |
HiddenTree |
newHiddenTree |
Creates a new HiddenTree object, to represent an @hidden tag. |
IdentifierTree |
newIdentifierTree |
Creates a new IdentifierTree object, to represent an identifier, such as in a @param tag. |
IndexTree |
newIndexTree |
Creates a new IndexTree object, to represent an {@index } tag. |
InheritDocTree |
newInheritDocTree() |
Creates a new InheritDocTree object, to represent an {@inheritDoc} tag. |
LinkTree |
newLinkPlainTree |
Creates a new LinkTree object, to represent a {@linkplain } tag. |
LinkTree |
newLinkTree |
Creates a new LinkTree object, to represent a {@link } tag. |
LiteralTree |
newLiteralTree |
Creates a new LiteralTree object, to represent a {@literal } tag. |
ParamTree |
newParamTree |
Creates a new ParamTree object, to represent a @param tag. |
ProvidesTree |
newProvidesTree |
Creates a new ProvidesTree object, to represent a @provides tag. |
ReferenceTree |
newReferenceTree |
Creates a new ReferenceTree object, to represent a reference to an API element. |
default ReturnTree |
newReturnTree |
Creates a new ReturnTree object, to represent a @return tag or {@return} tag. |
ReturnTree |
newReturnTree |
Creates a new ReturnTree object, to represent a @return tag. |
SeeTree |
newSeeTree |
Creates a new SeeTree object, to represent a @see tag. |
SerialDataTree |
newSerialDataTree |
Creates a new SerialDataTree object, to represent a @serialData tag. |
SerialFieldTree |
newSerialFieldTree |
Creates a new SerialFieldTree object, to represent a @serialField tag. |
SerialTree |
newSerialTree |
Creates a new SerialTree object, to represent a @serial tag. |
SinceTree |
newSinceTree |
Creates a new SinceTree object, to represent a @since tag. |
SnippetTree |
newSnippetTree |
Creates a new SnippetTree object, to represent a {@snippet } tag. |
SpecTree |
newSpecTree |
Creates a new SpecTree object, to represent an @spec tag. |
StartElementTree |
newStartElementTree |
Creates a new StartElementTree object, to represent the start of an HTML element. |
default SummaryTree |
newSummaryTree |
Creates a new SummaryTree object, to represent a {@summary } tag. |
SystemPropertyTree |
newSystemPropertyTree |
Creates a new SystemPropertyTree object, to represent a {@systemProperty } tag. |
TextTree |
newTextTree |
Creates a new TextTree object, to represent some plain text. |
ThrowsTree |
newThrowsTree |
Creates a new ThrowsTree object, to represent a @throws tag. |
UnknownBlockTagTree |
newUnknownBlockTagTree |
Creates a new UnknownBlockTagTree object, to represent an unrecognized block tag. |
UnknownInlineTagTree |
newUnknownInlineTagTree |
Creates a new UnknownInlineTagTree object, to represent an unrecognized inline tag. |
UsesTree |
newUsesTree |
Creates a new UsesTree object, to represent a @uses tag. |
ValueTree |
newValueTree |
Creates a new ValueTree object, to represent a {@value } tag. |
default ValueTree |
newValueTree |
Creates a new ValueTree object, to represent a {@value } tag. |
VersionTree |
newVersionTree |
Creates a new VersionTree object, to represent a {@version } tag. |
AttributeTree newAttributeTree(Name name, AttributeTree.ValueKind vkind, List<? extends DocTree> value)
AttributeTree object, to represent an attribute in an HTML element or tag.name - the name of the attributevkind - the kind of the attribute valuevalue - the value, if any, of the attributeAttributeTree objectAuthorTree newAuthorTree(List<? extends DocTree> name)
AuthorTree object, to represent an @author tag.name - the name of the authorAuthorTree objectLiteralTree newCodeTree(TextTree text)
LiteralTree object, to represent a {@code } tag.text - the content of the tagLiteralTree objectCommentTree newCommentTree(String text)
CommentTree, to represent an HTML comment.text - the content of the commentCommentTree objectDeprecatedTree newDeprecatedTree(List<? extends DocTree> text)
DeprecatedTree object, to represent an @deprecated tag.text - the content of the tagDeprecatedTree objectDocCommentTree newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags)
DocCommentTree object, to represent a complete doc comment.fullBody - the entire body of the doc commenttags - the block tags in the doc commentDocCommentTree objectDocCommentTree newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags, List<? extends DocTree> preamble, List<? extends DocTree> postamble)
DocCommentTree object, to represent the entire doc comment.fullBody - the entire body of the doc commenttags - the block tags in the doc commentpreamble - the meta content of an html file including the body tagpostamble - the meta content of an html including the closing body tagDocCommentTree objectDocRootTree newDocRootTree()
DocRootTree object, to represent an {@docRoot} tag.DocRootTree objectDocTypeTree newDocTypeTree(String text)
DocTypeTree, to represent a DOCTYPE HTML declaration.text - the content of the declarationDocTypeTree objectEndElementTree newEndElementTree(Name name)
EndElement object, to represent the end of an HTML element.name - the name of the HTML elementEndElementTree objectEntityTree newEntityTree(Name name)
EntityTree object, to represent an HTML entity.name - the name of the entity, representing the characters between '&' and ';' in the representation of the entity in an HTML documentEntityTree objectErroneousTree newErroneousTree(String text, Diagnostic<JavaFileObject> diag)
ErroneousTree object, to represent some unparseable input.text - the unparseable textdiag - a diagnostic associated with the unparseable text, or null
ErroneousTree objectEscapeTree newEscapeTree(char ch)
EscapeTree object, to represent an escaped character.@@, representing @, where it would otherwise be treated as introducing a block or inline tag, @/, representing /, as part of *@/ to represent */, and @*, representing *, where it would otherwise be discarded, after whitespace at the beginning of a line. ch - the characterEscapeTree objectThrowsTree newExceptionTree(ReferenceTree name, List<? extends DocTree> description)
ThrowsTree object, to represent an @exception tag.name - the name of the exceptiondescription - a description of why the exception might be thrownThrowsTree objectHiddenTree newHiddenTree(List<? extends DocTree> text)
HiddenTree object, to represent an @hidden tag.text - the content of the tagHiddenTree objectIdentifierTree newIdentifierTree(Name name)
IdentifierTree object, to represent an identifier, such as in a @param tag.name - the name of the identifierIdentifierTree objectIndexTree newIndexTree(DocTree term, List<? extends DocTree> description)
IndexTree object, to represent an {@index } tag.term - the search termdescription - an optional description of the search termIndexTree objectInheritDocTree newInheritDocTree()
InheritDocTree object, to represent an {@inheritDoc} tag.InheritDocTree objectLinkTree newLinkTree(ReferenceTree ref, List<? extends DocTree> label)
LinkTree object, to represent a {@link } tag.ref - the API element being referencedlabel - an optional label for the linkLinkTree objectLinkTree newLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label)
LinkTree object, to represent a {@linkplain } tag.ref - the API element being referencedlabel - an optional label for the linkLinkTree objectLiteralTree newLiteralTree(TextTree text)
LiteralTree object, to represent a {@literal } tag.text - the content of the tagLiteralTree objectParamTree newParamTree(boolean isTypeParameter, IdentifierTree name, List<? extends DocTree> description)
ParamTree object, to represent a @param tag.isTypeParameter - true if this is a type parameter, and false otherwisename - the parameter being describeddescription - the description of the parameterParamTree objectProvidesTree newProvidesTree(ReferenceTree name, List<? extends DocTree> description)
ProvidesTree object, to represent a @provides tag.name - the name of the service typedescription - a description of the service being providedProvidesTree objectReferenceTree newReferenceTree(String signature)
ReferenceTree object, to represent a reference to an API element.signature - the doc comment signature of the referenceReferenceTree objectReturnTree newReturnTree(List<? extends DocTree> description)
ReturnTree object, to represent a @return tag.description - the description of the return value of a methodReturnTree objectdefault ReturnTree newReturnTree(boolean isInline, List<? extends DocTree> description)
ReturnTree object, to represent a @return tag or {@return} tag.UnsupportedOperationException if isInline is true, and calls newReturnTree(List) otherwise.isInline - true if this instance is as an inline tag, and false otherwisedescription - the description of the return value of a methodReturnTree objectUnsupportedOperationException - if inline {@return} tags are not supportedSeeTree newSeeTree(List<? extends DocTree> reference)
SeeTree object, to represent a @see tag.reference - the referenceSeeTree objectSerialTree newSerialTree(List<? extends DocTree> description)
SerialTree object, to represent a @serial tag.description - the description for the tagSerialTree objectSerialDataTree newSerialDataTree(List<? extends DocTree> description)
SerialDataTree object, to represent a @serialData tag.description - the description for the tagSerialDataTree objectSerialFieldTree newSerialFieldTree(IdentifierTree name, ReferenceTree type, List<? extends DocTree> description)
SerialFieldTree object, to represent a @serialField tag.name - the name of the fieldtype - the type of the fielddescription - the description of the fieldSerialFieldTree objectSinceTree newSinceTree(List<? extends DocTree> text)
SinceTree object, to represent a @since tag.text - the content of the tagSinceTree objectSnippetTree newSnippetTree(List<? extends DocTree> attributes, TextTree text)
SnippetTree object, to represent a {@snippet } tag.attributes - the attributes of the tagtext - the body of the tag, or null if the tag has no body (not to be confused with an empty body)SnippetTree objectSpecTree newSpecTree(TextTree url, List<? extends DocTree> title)
SpecTree object, to represent an @spec tag.url - the urltitle - the titleSpecTree objectStartElementTree newStartElementTree(Name name, List<? extends DocTree> attrs, boolean selfClosing)
StartElementTree object, to represent the start of an HTML element.name - the name of the HTML elementattrs - the attributesselfClosing - true if the start element is marked as self-closing; otherwise false
StartElementTree objectdefault SummaryTree newSummaryTree(List<? extends DocTree> summary)
SummaryTree object, to represent a {@summary } tag.UnsupportedOperationException.summary - the content of the tagSummaryTree objectSystemPropertyTree newSystemPropertyTree(Name propertyName)
SystemPropertyTree object, to represent a {@systemProperty } tag.propertyName - the system property nameSystemPropertyTree objectTextTree newTextTree(String text)
TextTree object, to represent some plain text.text - the textTextTree objectThrowsTree newThrowsTree(ReferenceTree name, List<? extends DocTree> description)
ThrowsTree object, to represent a @throws tag.name - the name of the exceptiondescription - a description of why the exception might be thrownThrowsTree objectUnknownBlockTagTree newUnknownBlockTagTree(Name name, List<? extends DocTree> content)
UnknownBlockTagTree object, to represent an unrecognized block tag.name - the name of the block tagcontent - the contentUnknownBlockTagTree objectUnknownInlineTagTree newUnknownInlineTagTree(Name name, List<? extends DocTree> content)
UnknownInlineTagTree object, to represent an unrecognized inline tag.name - the name of the inline tagcontent - the contentUnknownInlineTagTree objectUsesTree newUsesTree(ReferenceTree name, List<? extends DocTree> description)
UsesTree object, to represent a @uses tag.name - the name of the service typedescription - a description of how the service will be usedUsesTree objectValueTree newValueTree(ReferenceTree ref)
ValueTree object, to represent a {@value } tag.ref - a reference to the valueValueTree objectdefault ValueTree newValueTree(TextTree format, ReferenceTree ref)
ValueTree object, to represent a {@value } tag.newValueTree(ref).format - a format string for the valueref - a reference to the valueValueTree objectVersionTree newVersionTree(List<? extends DocTree> text)
VersionTree object, to represent a {@version } tag.text - the content of the tagVersionTree objectDocTreeFactory at(int pos)
NOPOS.pos - the positionList<DocTree> getFirstSentence(List<? extends DocTree> list)
BreakIterator and other heuristics. The resulting list may share a common set of initial items with the input list.list - the list
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.compiler/com/sun/source/util/DocTreeFactory.html