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

public Class RawHtml

extends Content
Class Inheritance
Imports
java.io.IOException, .Writer, java.util.regex.Matcher, .Pattern

Class for generating raw HTML content to be added to HTML pages of javadoc output.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
protected final String
pack-priv Pattern

Constructor Summary

AccessConstructor and Description
private
RawHtml(CharSequence
raw HTML text to be added
rawHtml
)

Constructor to construct a RawHtml object.

Method Summary

Modifier and TypeMethod and Description
public static RawHtml

Returns:

the HTML
cdata
(String
the body of the CDATA section
body
)

Creates HTML for an HTML CDATA section.

protected static int
public static RawHtml

Returns:

the HTML
comment
(String
the body of the comment
body
)

Creates HTML for an HTML comment.

public static RawHtml

Returns:

the HTML
endElement
(CharSequence
the name of the element
name
)

Creates HTML for the end of an element.

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 static RawHtml

Returns:

the HTML
markdown
(CharSequence
the fragment
markdownOutput
)

Creates HTML for a fragment of Markdown output.

public static RawHtml

Returns:

the HTML
of
(CharSequence
the string
rawHtml
)

Creates HTML for an arbitrary string of HTML.

private static RawHtml
section(String prefix, String body, String suffix)

public static RawHtml

Returns:

the HTML
startElement
(CharSequence
the name of the element
name
,
Content
content containing any attributes
attrs
,
boolean
whether this is a self-closing element.
selfClosing
)

Creates HTML for the start of an element.

public Content
stripTags()

Overrides jdk.javadoc.internal.html.Content.stripTags.

Returns the plain text of this content with HTML tags removed.

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:
addaddaddAllcharCountisDiscardable

Field Detail

rawHtmlContentback to summary
protected final String rawHtmlContent
tagback to summary
pack-priv Pattern tag

Constructor Detail

RawHtmlback to summary
private RawHtml(CharSequence rawHtml)

Constructor to construct a RawHtml object.

Parameters
rawHtml:CharSequence

raw HTML text to be added

Method Detail

cdataback to summary
public static RawHtml cdata(String body)

Creates HTML for an HTML CDATA section. The body will be enclosed in <![CDATA] and ]]> if it does not already begin and end with those sequences.

Parameters
body:String

the body of the CDATA section

Returns:RawHtml

the HTML

charCountback to summary
protected static int charCount(CharSequence htmlText)
commentback to summary
public static RawHtml comment(String body)

Creates HTML for an HTML comment. The body will be enclosed in <!-- and --> if it does not already begin and end with those sequences.

Parameters
body:String

the body of the comment

Returns:RawHtml

the HTML

endElementback to summary
public static RawHtml endElement(CharSequence name)

Creates HTML for the end of an element.

Parameters
name:CharSequence

the name of the element

Returns:RawHtml

the HTML

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
markdownback to summary
public static RawHtml markdown(CharSequence markdownOutput)

Creates HTML for a fragment of Markdown output.

Parameters
markdownOutput:CharSequence

the fragment

Returns:RawHtml

the HTML

ofback to summary
public static RawHtml of(CharSequence rawHtml)

Creates HTML for an arbitrary string of HTML. The string is accepted as-is and is not validated in any way. It should be syntactically well-formed and contain matching < and >, and matching quotes for attributes.

Parameters
rawHtml:CharSequence

the string

Returns:RawHtml

the HTML

sectionback to summary
private static RawHtml section(String prefix, String body, String suffix)
startElementback to summary
public static RawHtml startElement(CharSequence name, Content attrs, boolean selfClosing)

Creates HTML for the start of an element.

Parameters
name:CharSequence

the name of the element

attrs:Content

content containing any attributes

selfClosing:boolean

whether this is a self-closing element.

Returns:RawHtml

the HTML

stripTagsback to summary
public Content stripTags()

Overrides jdk.javadoc.internal.html.Content.stripTags.

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

Returns the plain text of this content with HTML tags removed.

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
jdk.javadoc.internal.html back to summary

private final Enum RawHtml.State

extends Enum<RawHtml.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final RawHtml.State
public static final RawHtml.State
public static final RawHtml.State
public static final RawHtml.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RawHtml.State
public static RawHtml.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ENTITYback to summary
public static final RawHtml.State ENTITY
STRINGback to summary
public static final RawHtml.State STRING
TAGback to summary
public static final RawHtml.State TAG
TEXTback to summary
public static final RawHtml.State TEXT

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static RawHtml.State valueOf(String name)
valuesback to summary
public static RawHtml.State[] values()