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

public Class Entity

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

A representation of HTML entities.

Field Summary

Modifier and TypeField and Description
public static final Entity
public static final Entity
public static final Entity
public static final Entity
public final String

Constructor Summary

AccessConstructor and Description
private
Entity(String text)

Method Summary

Modifier and TypeMethod and Description
public int
charCount()

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

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

pack-priv static String

Returns:

the string with all of the HTML characters escaped
escapeHtmlChars
(CharSequence
the string to escape
s
)

Escapes the special HTML characters in a given string using the appropriate entities.

pack-priv static void
escapeHtmlChars(CharSequence
the string
s
,
StringBuilder
the string builder
sb
)

Escapes the special HTML characters in a given string using the appropriate entities, appending the results into a string builder.

private static void
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 Entity

Returns:

the entity
of
(CharSequence
the name, or numeric value
name
)

Creates an entity with a given name or numeric value.

public boolean
write(Writer writer, 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:
addaddaddAllisDiscardablestripTagstoString

Field Detail

AMPERSANDback to summary
public static final Entity AMPERSAND
GREATER_THANback to summary
public static final Entity GREATER_THAN
LESS_THANback to summary
public static final Entity LESS_THAN
NO_BREAK_SPACEback to summary
public static final Entity NO_BREAK_SPACE
textback to summary
public final String text

Constructor Detail

Entityback to summary
private Entity(String text)

Method Detail

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
escapeHtmlCharsback to summary
pack-priv static String escapeHtmlChars(CharSequence s)

Escapes the special HTML characters in a given string using the appropriate entities.

Parameters
s:CharSequence

the string to escape

Returns:String

the string with all of the HTML characters escaped

escapeHtmlCharsback to summary
pack-priv static void escapeHtmlChars(CharSequence s, StringBuilder sb)

Escapes the special HTML characters in a given string using the appropriate entities, appending the results into a string builder.

Parameters
s:CharSequence

the string

sb:StringBuilder

the string builder

escapeHtmlCharsback to summary
private static void escapeHtmlChars(String s, int start, StringBuilder sb)
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
ofback to summary
public static Entity of(CharSequence name)

Creates an entity with a given name or numeric value.

Parameters
name:CharSequence

the name, or numeric value

Returns:Entity

the entity

writeback to summary
public boolean write(Writer writer, 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