|
SimpleServlets v5.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.simpleservlets.htmlobjects.GenericHTMLElement
com.simpleservlets.htmlobjects.HTMLString
public class HTMLString
Represents a String as an HTMLElement.
Strings passed to the constructors are parsed by
HTMLUtil.processMarkupEntities(String) so that any
special markup characters (like <, >, etc.) are substituted
with the entity references.
In some rarer cases, you can avoid this substitution by
creating an instance with the createUnparsed(String, HTMLElement)
or createUnparsed(String) methods.
Does not have a start or end tag (NoTag) and
does not support the addition of any children (NoChildrenAllowed).
| Field Summary | |
|---|---|
static String |
NEWLINE
|
| Fields inherited from interface com.simpleservlets.htmlobjects.HTMLElement |
|---|
ZERO_LEN_ARRAY |
| Constructor Summary | |
|---|---|
HTMLString(String text)
Does: this(text, null, false);. |
|
HTMLString(String text,
boolean safeToWrapWithWhitespace)
Does: this(text, null, safeToWrapWithWhitespace);. |
|
HTMLString(String text,
HTMLElement parent)
Does: this(text, parent, false);. |
|
HTMLString(String text,
HTMLElement parent,
boolean safeToWrapWithWhitespace)
|
|
| Method Summary | |
|---|---|
static HTMLString |
createUnparsed(String text)
Creates an HTMLString for the specified text without substituting special markup characters with their entities. |
static HTMLString |
createUnparsed(String text,
HTMLElement parent)
Creates an HTMLString for the specified text without substituting special markup characters with their entities. |
String |
getText()
Returns the text—potentially parsed with entity substitution during construction. |
void |
setSafeToWrapWithWhitespace(boolean extraWhitespaceIsHarmless)
Overrides protected method to make it public. |
| Methods inherited from class com.simpleservlets.htmlobjects.GenericHTMLElement |
|---|
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setStyle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.simpleservlets.htmlobjects.HTMLElement |
|---|
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setStyle |
| Field Detail |
|---|
public static final String NEWLINE
| Constructor Detail |
|---|
public HTMLString(String text,
HTMLElement parent,
boolean safeToWrapWithWhitespace)
public HTMLString(String text,
HTMLElement parent)
public HTMLString(String text,
boolean safeToWrapWithWhitespace)
public HTMLString(String text)
| Method Detail |
|---|
public static HTMLString createUnparsed(String text,
HTMLElement parent)
public static HTMLString createUnparsed(String text)
public String getText()
public void setSafeToWrapWithWhitespace(boolean extraWhitespaceIsHarmless)
setSafeToWrapWithWhitespace in class GenericHTMLElement
|
SimpleServlets v5.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||