- 
public interface DocTreeFactoryFactory for creatingDocTreenodes.- Implementation Note:
 - The methods in an implementation of this interface may only accept 
DocTreenodes that have been created by the same implementation. - Since:
 - 9
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DocTreeFactoryat(int pos)Set the position to be recorded in subsequent tree nodes created by this factory.List<DocTree>getFirstSentence(List<? extends DocTree> list)Get the first sentence contained in a list of content.AttributeTreenewAttributeTree(Name name, AttributeTree.ValueKind vkind, List<? extends DocTree> value)Create a newAttributeTreeobject, to represent an HTML attribute in an HTML tag.AuthorTreenewAuthorTree(List<? extends DocTree> name)Create a newAuthorTreeobject, to represent an{@author }tag.LiteralTreenewCodeTree(TextTree text)Create a newCodeTreeobject, to represent a{@code }tag.CommentTreenewCommentTree(String text)Create a newCommentTree, to represent an HTML comment.DeprecatedTreenewDeprecatedTree(List<? extends DocTree> text)Create a newDeprecatedTreeobject, to represent an{@deprecated }tag.DocCommentTreenewDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags)Create a newDocCommentTreeobject, to represent a complete doc comment.DocCommentTreenewDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags, List<? extends DocTree> preamble, List<? extends DocTree> postamble)Create a newDocCommentTreeobject, to represent the enitire doc comment.DocRootTreenewDocRootTree()Create a newDocRootTreeobject, to represent an{@docroot}tag.DocTypeTreenewDocTypeTree(String text)Create a newDocTypeTree, to represent aDOCTYPEHTML declaration.EndElementTreenewEndElementTree(Name name)Create a newEndElementobject, to represent the end of an HTML element.EntityTreenewEntityTree(Name name)Create a newEntityTreeobject, to represent an HTML entity.ErroneousTreenewErroneousTree(String text, Diagnostic<JavaFileObject> diag)Create a newErroneousTreeobject, to represent some unparseable input.ThrowsTreenewExceptionTree(ReferenceTree name, List<? extends DocTree> description)Create a newExceptionTreeobject, to represent an@exceptiontag.HiddenTreenewHiddenTree(List<? extends DocTree> text)Create a newHiddenTreeobject, to represent an{@hidden }tag.IdentifierTreenewIdentifierTree(Name name)Create a newIdentifierTreeobject, to represent an identifier, such as in a@paramtag.IndexTreenewIndexTree(DocTree term, List<? extends DocTree> description)Create a newIndexTreeobject, to represent an{@index }tag.InheritDocTreenewInheritDocTree()Create a newInheritDocTreeobject, to represent an{@inheritDoc}tag.LinkTreenewLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label)Create a newLinkPlainTreeobject, to represent a{@linkplain }tag.LinkTreenewLinkTree(ReferenceTree ref, List<? extends DocTree> label)Create a newLinkTreeobject, to represent a{@link }tag.LiteralTreenewLiteralTree(TextTree text)Create a newLiteralTreeobject, to represent a{@literal }tag.ParamTreenewParamTree(boolean isTypeParameter, IdentifierTree name, List<? extends DocTree> description)Create a newParamTreeobject, to represent a@paramtag.ProvidesTreenewProvidesTree(ReferenceTree name, List<? extends DocTree> description)Create a newProvidesTreeobject, to represent a@providestag.ReferenceTreenewReferenceTree(String signature)Create a newReferenceTreeobject, to represent a reference to an API element.ReturnTreenewReturnTree(List<? extends DocTree> description)Create a newReturnTreeobject, to represent a@returntag.SeeTreenewSeeTree(List<? extends DocTree> reference)Create a newSeeTreeobject, to represent a@seetag.SerialDataTreenewSerialDataTree(List<? extends DocTree> description)Create a newSerialDataTreeobject, to represent a@serialDatatag.SerialFieldTreenewSerialFieldTree(IdentifierTree name, ReferenceTree type, List<? extends DocTree> description)Create a newSerialFieldTreeobject, to represent a@serialFieldtag.SerialTreenewSerialTree(List<? extends DocTree> description)Create a newSerialTreeobject, to represent a@serialtag.SinceTreenewSinceTree(List<? extends DocTree> text)Create a newSinceTreeobject, to represent a@sincetag.StartElementTreenewStartElementTree(Name name, List<? extends DocTree> attrs, boolean selfClosing)Create a newStartElementTreeobject, to represent the start of an HTML element.default SummaryTreenewSummaryTree(List<? extends DocTree> summary)Create a newSummaryTreeobject, to represent a@summarytag.TextTreenewTextTree(String text)Create a newTextTreeobject, to represent some plain text.ThrowsTreenewThrowsTree(ReferenceTree name, List<? extends DocTree> description)Create a newThrowsTreeobject, to represent a@throwstag.UnknownBlockTagTreenewUnknownBlockTagTree(Name name, List<? extends DocTree> content)Create a newUnknownBlockTagTreeobject, to represent an unrecognized block tag.UnknownInlineTagTreenewUnknownInlineTagTree(Name name, List<? extends DocTree> content)Create a newUnknownInlineTagTreeobject, to represent an unrecognized inline tag.UsesTreenewUsesTree(ReferenceTree name, List<? extends DocTree> description)Create a newUsesTreeobject, to represent a@usestag.ValueTreenewValueTree(ReferenceTree ref)Create a newValueTreeobject, to represent a{@value }tag.VersionTreenewVersionTree(List<? extends DocTree> text)Create a newVersionTreeobject, to represent a{@version }tag. 
 - 
 
- 
- 
Method Detail
- 
newAttributeTree
AttributeTree newAttributeTree(Name name, AttributeTree.ValueKind vkind, List<? extends DocTree> value)
Create a newAttributeTreeobject, to represent an HTML attribute in an HTML tag.- Parameters:
 name- the name of the attributevkind- the kind of attribute valuevalue- the value, if any, of the attribute- Returns:
 - an 
AttributeTreeobject 
 
- 
newAuthorTree
AuthorTree newAuthorTree(List<? extends DocTree> name)
Create a newAuthorTreeobject, to represent an{@author }tag.- Parameters:
 name- the name of the author- Returns:
 - an 
AuthorTreeobject 
 
- 
newCodeTree
LiteralTree newCodeTree(TextTree text)
Create a newCodeTreeobject, to represent a{@code }tag.- Parameters:
 text- the content of the tag- Returns:
 - a 
CodeTreeobject 
 
- 
newCommentTree
CommentTree newCommentTree(String text)
Create a newCommentTree, to represent an HTML comment.- Parameters:
 text- the content of the comment- Returns:
 - a 
CommentTreeobject 
 
- 
newDeprecatedTree
DeprecatedTree newDeprecatedTree(List<? extends DocTree> text)
Create a newDeprecatedTreeobject, to represent an{@deprecated }tag.- Parameters:
 text- the content of the tag- Returns:
 - a 
DeprecatedTreeobject 
 
- 
newDocCommentTree
DocCommentTree newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags)
Create a newDocCommentTreeobject, to represent a complete doc comment.- Parameters:
 fullBody- the entire body of the doc commenttags- the block tags in the doc comment- Returns:
 - a 
DocCommentTreeobject 
 
- 
newDocCommentTree
DocCommentTree newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags, List<? extends DocTree> preamble, List<? extends DocTree> postamble)
Create a newDocCommentTreeobject, to represent the enitire doc comment.- Parameters:
 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 tag- Returns:
 - a 
DocCommentTreeobject - Since:
 - 10
 
 
- 
newDocRootTree
DocRootTree newDocRootTree()
Create a newDocRootTreeobject, to represent an{@docroot}tag.- Returns:
 - a 
DocRootTreeobject 
 
- 
newDocTypeTree
DocTypeTree newDocTypeTree(String text)
Create a newDocTypeTree, to represent aDOCTYPEHTML declaration.- Parameters:
 text- the content of the declaration- Returns:
 - a 
CommentTreeobject - Since:
 - 10
 
 
- 
newEndElementTree
EndElementTree newEndElementTree(Name name)
Create a newEndElementobject, to represent the end of an HTML element.- Parameters:
 name- the name of the HTML element- Returns:
 - an 
EndElementTreeobject 
 
- 
newEntityTree
EntityTree newEntityTree(Name name)
Create a newEntityTreeobject, to represent an HTML entity.- Parameters:
 name- the name of the entity, representing the characters between '<' and ';' in the representation of the entity in an HTML document- Returns:
 - an 
EntityTreeobject 
 
- 
newErroneousTree
ErroneousTree newErroneousTree(String text, Diagnostic<JavaFileObject> diag)
Create a newErroneousTreeobject, to represent some unparseable input.- Parameters:
 text- the unparseable textdiag- a diagnostic associated with the unparseable text, or null- Returns:
 - an 
ErroneousTreeobject 
 
- 
newExceptionTree
ThrowsTree newExceptionTree(ReferenceTree name, List<? extends DocTree> description)
Create a newExceptionTreeobject, to represent an@exceptiontag.- Parameters:
 name- the name of the exceptiondescription- a description of why the exception might be thrown- Returns:
 - an 
ExceptionTreeobject 
 
- 
newHiddenTree
HiddenTree newHiddenTree(List<? extends DocTree> text)
Create a newHiddenTreeobject, to represent an{@hidden }tag.- Parameters:
 text- the content of the tag- Returns:
 - a 
HiddenTreeobject 
 
- 
newIdentifierTree
IdentifierTree newIdentifierTree(Name name)
Create a newIdentifierTreeobject, to represent an identifier, such as in a@paramtag.- Parameters:
 name- the name of the identifier- Returns:
 - an 
IdentifierTreeobject 
 
- 
newIndexTree
IndexTree newIndexTree(DocTree term, List<? extends DocTree> description)
Create a newIndexTreeobject, to represent an{@index }tag.- Parameters:
 term- the search termdescription- an optional description of the search term- Returns:
 - an 
IndexTreeobject 
 
- 
newInheritDocTree
InheritDocTree newInheritDocTree()
Create a newInheritDocTreeobject, to represent an{@inheritDoc}tag.- Returns:
 - an 
InheritDocTreeobject 
 
- 
newLinkTree
LinkTree newLinkTree(ReferenceTree ref, List<? extends DocTree> label)
Create a newLinkTreeobject, to represent a{@link }tag.- Parameters:
 ref- the API element being referencedlabel- an optional label for the link- Returns:
 - a 
LinkTreeobject 
 
- 
newLinkPlainTree
LinkTree newLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label)
Create a newLinkPlainTreeobject, to represent a{@linkplain }tag.- Parameters:
 ref- the API element being referencedlabel- an optional label for the link- Returns:
 - a 
LinkPlainTreeobject 
 
- 
newLiteralTree
LiteralTree newLiteralTree(TextTree text)
Create a newLiteralTreeobject, to represent a{@literal }tag.- Parameters:
 text- the content of the tag- Returns:
 - a 
LiteralTreeobject 
 
- 
newParamTree
ParamTree newParamTree(boolean isTypeParameter, IdentifierTree name, List<? extends DocTree> description)
Create a newParamTreeobject, to represent a@paramtag.- Parameters:
 isTypeParameter- true if this is a type parameter, and false otherwisename- the parameter being describeddescription- the description of the parameter- Returns:
 - a 
ParamTreeobject 
 
- 
newProvidesTree
ProvidesTree newProvidesTree(ReferenceTree name, List<? extends DocTree> description)
Create a newProvidesTreeobject, to represent a@providestag.- Parameters:
 name- the name of the service typedescription- a description of the service being provided- Returns:
 - a 
ProvidesTreeobject 
 
- 
newReferenceTree
ReferenceTree newReferenceTree(String signature)
Create a newReferenceTreeobject, to represent a reference to an API element.- Parameters:
 signature- the doc comment signature of the reference- Returns:
 - a 
ReferenceTreeobject 
 
- 
newReturnTree
ReturnTree newReturnTree(List<? extends DocTree> description)
Create a newReturnTreeobject, to represent a@returntag.- Parameters:
 description- the description of the return value of a method- Returns:
 - a 
ReturnTreeobject 
 
- 
newSeeTree
SeeTree newSeeTree(List<? extends DocTree> reference)
Create a newSeeTreeobject, to represent a@seetag.- Parameters:
 reference- the reference- Returns:
 - a 
SeeTreeobject 
 
- 
newSerialTree
SerialTree newSerialTree(List<? extends DocTree> description)
Create a newSerialTreeobject, to represent a@serialtag.- Parameters:
 description- the description for the tag- Returns:
 - a 
SerialTreeobject 
 
- 
newSerialDataTree
SerialDataTree newSerialDataTree(List<? extends DocTree> description)
Create a newSerialDataTreeobject, to represent a@serialDatatag.- Parameters:
 description- the description for the tag- Returns:
 - a 
SerialDataTreeobject 
 
- 
newSerialFieldTree
SerialFieldTree newSerialFieldTree(IdentifierTree name, ReferenceTree type, List<? extends DocTree> description)
Create a newSerialFieldTreeobject, to represent a@serialFieldtag.- Parameters:
 name- the name of the fieldtype- the type of the fielddescription- the description of the field- Returns:
 - a 
SerialFieldTreeobject 
 
- 
newSinceTree
SinceTree newSinceTree(List<? extends DocTree> text)
Create a newSinceTreeobject, to represent a@sincetag.- Parameters:
 text- the content of the tag- Returns:
 - a 
SinceTreeobject 
 
- 
newStartElementTree
StartElementTree newStartElementTree(Name name, List<? extends DocTree> attrs, boolean selfClosing)
Create a newStartElementTreeobject, to represent the start of an HTML element.- Parameters:
 name- the name of the HTML elementattrs- the attributesselfClosing- true if the start element is marked as self-closing; otherwise false- Returns:
 - a 
StartElementTreeobject 
 
- 
newSummaryTree
default SummaryTree newSummaryTree(List<? extends DocTree> summary)
Create a newSummaryTreeobject, to represent a@summarytag.- Implementation Requirements:
 - This implementation throws 
UnsupportedOperationException. - Parameters:
 summary- the content of the tag- Returns:
 - a 
SummaryTreeobject - Since:
 - 10
 
 
- 
newTextTree
TextTree newTextTree(String text)
Create a newTextTreeobject, to represent some plain text.- Parameters:
 text- the text- Returns:
 - a 
TextTreeobject 
 
- 
newThrowsTree
ThrowsTree newThrowsTree(ReferenceTree name, List<? extends DocTree> description)
Create a newThrowsTreeobject, to represent a@throwstag.- Parameters:
 name- the name of the exceptiondescription- a description of why the exception might be thrown- Returns:
 - a 
ThrowsTreeobject 
 
- 
newUnknownBlockTagTree
UnknownBlockTagTree newUnknownBlockTagTree(Name name, List<? extends DocTree> content)
Create a newUnknownBlockTagTreeobject, to represent an unrecognized block tag.- Parameters:
 name- the name of the block tagcontent- the content- Returns:
 - an 
UnknownBlockTagTreeobject 
 
- 
newUnknownInlineTagTree
UnknownInlineTagTree newUnknownInlineTagTree(Name name, List<? extends DocTree> content)
Create a newUnknownInlineTagTreeobject, to represent an unrecognized inline tag.- Parameters:
 name- the name of the inline tagcontent- the content- Returns:
 - an 
UnknownInlineTagTreeobject 
 
- 
newUsesTree
UsesTree newUsesTree(ReferenceTree name, List<? extends DocTree> description)
Create a newUsesTreeobject, to represent a@usestag.- Parameters:
 name- the name of the service typedescription- a description of how the service will be used- Returns:
 - a 
UsesTreeobject 
 
- 
newValueTree
ValueTree newValueTree(ReferenceTree ref)
Create a newValueTreeobject, to represent a{@value }tag.- Parameters:
 ref- a reference to the value- Returns:
 - a 
ValueTreeobject 
 
- 
newVersionTree
VersionTree newVersionTree(List<? extends DocTree> text)
Create a newVersionTreeobject, to represent a{@version }tag.- Parameters:
 text- the content of the tag- Returns:
 - a 
VersionTreeobject 
 
- 
at
DocTreeFactory at(int pos)
Set the position to be recorded in subsequent tree nodes created by this factory. The position should be a character offset relative to the beginning of the source file orNOPOS.- Parameters:
 pos- the position- Returns:
 - this object, to facilitate method chaining
 
 
- 
getFirstSentence
List<DocTree> getFirstSentence(List<? extends DocTree> list)
Get the first sentence contained in a list of content. The determination of the first sentence is implementation specific, and may involve the use of a locale-specificBreakIteratorand other heuristics. The resulting list may share a common set of initial items with the input list.- Parameters:
 list- the list- Returns:
 - a list containing the first sentence of the list.
 
 
 - 
 
 -