| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final StringBuilder |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Script | |
| public Script | Returns: this objectthe text text)Appends the given text as a string constant to the string. |
| public Script | Returns: this objectthe text text, char the quote character to use quoteChar)Appends the given text as a string constant to the string. |
| public Content | |
| public static String | Returns: a string literal containing the stringthe string s)Returns a JavaScript string literal containing a specified string, escaping the characters of that string as needed. |
| public static String | Returns: a string literal containing the stringthe string s, char the quote character to use for the literal quoteChar)Returns a JavaScript string literal containing a specified string, escaping the characters of that string as needed. |
| sb | back to summary |
|---|---|
| private final StringBuilder sb | |
| Script | back to summary |
|---|---|
| public Script() Creates an empty script. | |
| Script | back to summary |
|---|---|
| public Script(String code) Creates a new script containing the specified code.
| |
| append | back to summary |
|---|---|
| public Script append(CharSequence code) Appends the given code to the script.
| |
| appendStringLiteral | back to summary |
|---|---|
| public Script appendStringLiteral(CharSequence text) Appends the given text as a string constant to the string. Characters within the string will be escaped as needed.
| |
| appendStringLiteral | back to summary |
|---|---|
| public Script appendStringLiteral(CharSequence text, char quoteChar) Appends the given text as a string constant to the string. Characters within the string will be escaped as needed.
| |
| asContent | back to summary |
|---|---|
| public Content asContent() Returns a "live" view of the script as a
| |
| stringLiteral | back to summary |
|---|---|
| public static String stringLiteral(CharSequence s) Returns a JavaScript string literal containing a specified string, escaping the characters of that string as needed.
| |
| stringLiteral | back to summary |
|---|---|
| public static String stringLiteral(CharSequence s, char quoteChar) Returns a JavaScript string literal containing a specified string, escaping the characters of that string as needed.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final StringBuilder |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Script. | add(CharSequence code)
Overrides jdk. Adds a string content to the existing content. |
| public boolean | isEmpty()
Implements abstract jdk. Returns true if the content is empty. |
| public boolean | write(Writer writer, String newline, boolean atNewline)
Implements abstract jdk. Writes content to a writer, using a given newline sequence, which should be
either |
| sb | back to summary |
|---|---|
| private final StringBuilder sb | |
| ScriptContent | back to summary |
|---|---|
| pack-priv ScriptContent(StringBuilder sb) | |
| add | back to summary |
|---|---|
| public Script. Overrides jdk. Doc from jdk. Adds a string content to the existing content. This is an optional operation.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements abstract jdk. Doc from jdk. Returns true if the content is empty.
| |
| write | back to summary |
|---|---|
| public boolean write(Writer writer, String newline, boolean atNewline) throws IOException Implements abstract jdk. Doc from jdk. Writes content to a writer, using a given newline sequence, which should be
either
| |