Package com.hubspot.jinjava.lib.tag
Class SetTag
- java.lang.Object
-
- com.hubspot.jinjava.lib.tag.SetTag
-
- All Implemented Interfaces:
Importable
,FlexibleTag
,Tag
,Serializable
public class SetTag extends Object implements Tag, FlexibleTag
{% set primary_line_height = primary_font_size_num*1.5 %} {% set lw_font_size = "font-size: " ~ lw_font_size_base ~ "px; " %} {% set lw_secondary_font_size = "font-size: " ~ (lw_font_size_base - 2) ~ "px; " %} {% set lw_line_height = "line-height: " ~ lw_font_size_base*1.5 ~ "px; " %}- Author:
- anysome
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
IGNORED_VARIABLE_NAME
static String
TAG_NAME
-
Constructor Summary
Constructors Constructor Description SetTag()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeSet(TagToken tagToken, JinjavaInterpreter interpreter, String[] varTokens, List<?> resolvedList, boolean allowDeferredValueOverride)
String
getEndTagName()
String
getName()
boolean
hasEndTag(TagToken tagToken)
String
interpret(TagNode tagNode, JinjavaInterpreter interpreter)
static String
renderChildren(TagNode tagNode, JinjavaInterpreter interpreter, String var)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hubspot.jinjava.lib.tag.Tag
interpretOutput, isRenderedInValidationMode
-
-
-
-
Field Detail
-
TAG_NAME
public static final String TAG_NAME
- See Also:
- Constant Field Values
-
IGNORED_VARIABLE_NAME
public static final String IGNORED_VARIABLE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceImportable
-
interpret
public String interpret(TagNode tagNode, JinjavaInterpreter interpreter)
-
renderChildren
public static String renderChildren(TagNode tagNode, JinjavaInterpreter interpreter, String var)
-
executeSet
public void executeSet(TagToken tagToken, JinjavaInterpreter interpreter, String[] varTokens, List<?> resolvedList, boolean allowDeferredValueOverride)
-
getEndTagName
public String getEndTagName()
- Specified by:
getEndTagName
in interfaceTag
- Returns:
- Get name of end tag (lowerCase). Null if it's a single tag without content.
-
hasEndTag
public boolean hasEndTag(TagToken tagToken)
- Specified by:
hasEndTag
in interfaceFlexibleTag
-
-