APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.javadoc.internal.html

public Class TextBuilder

extends Content
Class Inheritance
Imports
java.io.IOException, .Writer

Class for generating string content for HTML tags of javadoc output. The content is mutable to the extent that additional content may be added. Newlines are always represented by \n. Any special HTML characters will be escaped if and when the content is written out.

Field Summary

Modifier and TypeField and Description
private final StringBuilder

Constructor Summary

AccessConstructor and Description
public
TextBuilder()

Constructor to construct an empty TextBuilder object.

public
TextBuilder(CharSequence
initial content for the object
initialContent
)

Constructor to construct a TextBuilder object with some initial content.

Method Summary

Modifier and TypeMethod and Description
public TextBuilder
add(CharSequence
string content to be added
strContent
)

Overrides jdk.javadoc.internal.html.Content.add.

Adds content for the TextBuilder object.

public int
charCount()

Overrides jdk.javadoc.internal.html.Content.charCount.

Returns the number of characters of plain text content in this object.

public boolean
isEmpty()

Implements abstract jdk.javadoc.internal.html.Content.isEmpty.

Returns true if the content is empty.

public boolean
isPhrasingContent()

Overrides jdk.javadoc.internal.html.Content.isPhrasingContent.

Returns true if the content is "phrasing content".

public String
toString()

Overrides jdk.javadoc.internal.html.Content.toString.

Returns a string representation of the content.

public boolean
write(Writer out, String newline, boolean atNewline)

Implements abstract jdk.javadoc.internal.html.Content.write.

Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.

Inherited from jdk.javadoc.internal.html.Content:
addaddAllisDiscardablestripTags

Field Detail

stringBuilderback to summary
private final StringBuilder stringBuilder

Constructor Detail

TextBuilderback to summary
public TextBuilder()

Constructor to construct an empty TextBuilder object.

TextBuilderback to summary
public TextBuilder(CharSequence initialContent)

Constructor to construct a TextBuilder object with some initial content.

Parameters
initialContent:CharSequence

initial content for the object

Method Detail

addback to summary
public TextBuilder add(CharSequence strContent)

Overrides jdk.javadoc.internal.html.Content.add.

Adds content for the TextBuilder object.

Parameters
strContent:CharSequence

string content to be added

Annotations
@Override
charCountback to summary
public int charCount()

Overrides jdk.javadoc.internal.html.Content.charCount.

Doc from jdk.javadoc.internal.html.Content.charCount.

Returns the number of characters of plain text content in this object.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements abstract jdk.javadoc.internal.html.Content.isEmpty.

Doc from jdk.javadoc.internal.html.Content.isEmpty.

Returns true if the content is empty.

Annotations
@Override
isPhrasingContentback to summary
public boolean isPhrasingContent()

Overrides jdk.javadoc.internal.html.Content.isPhrasingContent.

Doc from jdk.javadoc.internal.html.Content.isPhrasingContent.

Returns true if the content is "phrasing content". Phrasing content is content that may appear in a paragraph, such as text, or certain HTML elements.

Annotations
@Override
toStringback to summary
public String toString()

Overrides jdk.javadoc.internal.html.Content.toString.

Doc from jdk.javadoc.internal.html.Content.toString.

Returns a string representation of the content. Newlines are represented by \n.

Annotations
@Override
writeback to summary
public boolean write(Writer out, String newline, boolean atNewline) throws IOException

Implements abstract jdk.javadoc.internal.html.Content.write.

Doc from jdk.javadoc.internal.html.Content.write.

Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.

Annotations
@Override
Exceptions
IOException:
if an error occurs while writing the output