public enum AutoescapeMode extends Enum<AutoescapeMode>
{print} commands that lack escaping directives are
encoded.| Enum Constant and Description |
|---|
CONTEXTUAL
Contextual auto-escaping is on for the template so directiveless prints will be escaped based
on the surrounding context.
|
NONCONTEXTUAL
Auto-escaping is on for the template so directiveless prints will be HTML escaped.
|
STRICT
Strict form of contextual autoescaping in which no autoescape-cancelling print directives nor
calls to non-strict templates are allowed.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributeValue()
Returns a form of this attribute's name suitable for use in a template attribute.
|
static Set<String> |
getAttributeValues()
The set created by element-wise application of
getAttributeValue() to all modes. |
static AutoescapeMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AutoescapeMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AutoescapeMode NONCONTEXTUAL
public static final AutoescapeMode CONTEXTUAL
public static final AutoescapeMode STRICT
public static AutoescapeMode[] values()
for (AutoescapeMode c : AutoescapeMode.values()) System.out.println(c);
public static AutoescapeMode 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 String getAttributeValue()
public static Set<String> getAttributeValues()
getAttributeValue() to all modes.