Package com.github.jknack.handlebars
Enum TagType
- All Implemented Interfaces:
Serializable,Comparable<TagType>,java.lang.constant.Constable
Tags are indicated by the double mustaches.
- Since:
- 0.12.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll variables are HTML escaped by default.Sections render blocks of text one or more times, depending on the value of the key in the current context.A var decorator tag, like:{{*name}}.Like {{#* decorator}}success{{/decorator}}.Same asVARbut can be invoked from inside a helper:{{helper (subexpression)}}.All variables are HTML escaped by default.The most basic tag type is the variable. -
Method Summary
Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
VAR
The most basic tag type is the variable. A{{name}}tag in a basic template will try to find the name key in the current context. If there is no name key, nothing will be rendered. -
STAR_VAR
A var decorator tag, like:{{*name}}. -
AMP_VAR
All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache:{{&name}}. -
TRIPLE_VAR
All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache:{{{name}}}. -
SUB_EXPRESSION
Same asVARbut can be invoked from inside a helper:{{helper (subexpression)}}. -
SECTION
Sections render blocks of text one or more times, depending on the value of the key in the current context.
A section begins with a pound and ends with a slash. That is, {{#person}} begins a "person" section while {{/person}} ends it.
-
START_SECTION
Like {{#* decorator}}success{{/decorator}}.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
inline
public boolean inline()True for inline tags.- Returns:
- True for inline tags.
-