public enum EscapeMode extends Enum<EscapeMode>
Modifier and Type | Method and Description |
---|---|
static EscapeMode |
combineModes(EscapeMode left,
EscapeMode right)
Computes the EscapeMode of the result of concatenating two values.
|
static EscapeMode |
computeEscapeMode(String escapeCmd)
Calls
computeEscapeMode(String, boolean) with doAutoEscape = false . |
static EscapeMode |
computeEscapeMode(String escapeCmd,
boolean doAutoEscape)
This function maps the type of escaping requested (escapeCmd) to the appropriate EscapeMode.
|
String |
getEscapeCommand() |
boolean |
isAutoEscapingMode() |
static EscapeMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EscapeMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EscapeMode ESCAPE_NONE
public static final EscapeMode ESCAPE_HTML
public static final EscapeMode ESCAPE_JS
public static final EscapeMode ESCAPE_URL
public static final EscapeMode ESCAPE_IS_CONSTANT
public static final EscapeMode ESCAPE_AUTO
public static final EscapeMode ESCAPE_AUTO_HTML
public static final EscapeMode ESCAPE_AUTO_JS
public static final EscapeMode ESCAPE_AUTO_JS_UNQUOTED
public static final EscapeMode ESCAPE_AUTO_STYLE
public static final EscapeMode ESCAPE_AUTO_ATTR
public static final EscapeMode ESCAPE_AUTO_UNQUOTED_ATTR
public static final EscapeMode ESCAPE_AUTO_ATTR_URI
public static final EscapeMode ESCAPE_AUTO_UNQUOTED_ATTR_URI
public static final EscapeMode ESCAPE_AUTO_ATTR_URI_START
public static final EscapeMode ESCAPE_AUTO_UNQUOTED_ATTR_URI_START
public static final EscapeMode ESCAPE_AUTO_ATTR_JS
public static final EscapeMode ESCAPE_AUTO_ATTR_UNQUOTED_JS
public static final EscapeMode ESCAPE_AUTO_UNQUOTED_ATTR_JS
public static final EscapeMode ESCAPE_AUTO_UNQUOTED_ATTR_UNQUOTED_JS
public static final EscapeMode ESCAPE_AUTO_ATTR_CSS
public static final EscapeMode ESCAPE_AUTO_UNQUOTED_ATTR_CSS
public static EscapeMode[] values()
for (EscapeMode c : EscapeMode.values()) System.out.println(c);
public static EscapeMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static EscapeMode computeEscapeMode(String escapeCmd, boolean doAutoEscape)
escapeCmd
- A string indicating type of escaping requested.doAutoEscape
- Whether auto escaping should be applied if escapeCmd is null. Corresponds
to the Config.AutoEscape HDF variable.public static EscapeMode computeEscapeMode(String escapeCmd)
computeEscapeMode(String, boolean)
with doAutoEscape = false
.escapeCmd
- A string indicating type of escaping requested.JSilverAutoEscapingException
- if escapeCmd
is not recognized.public static EscapeMode combineModes(EscapeMode left, EscapeMode right)
left
and right
respectively. For now, if either of the
values was escaped or a constant, we return ESCAPE_IS_CONSTANT
. This is how ClearSilver
behaves.ESCAPE_NONE
if either of the values was not escaped or constant. ESCAPE_IS_CONSTANT
otherwise.public boolean isAutoEscapingMode()
public String getEscapeCommand()
Copyright © 2010–2013 Google. All rights reserved.