Class ConditionalExpression
- java.lang.Object
-
- org.thymeleaf.standard.expression.Expression
-
- org.thymeleaf.standard.expression.ComplexExpression
-
- org.thymeleaf.standard.expression.ConditionalExpression
-
- All Implemented Interfaces:
java.io.Serializable,IStandardExpression
public final class ConditionalExpression extends ComplexExpression
Conditional complex expression (Thymeleaf Standard Expressions)
Note a class with this name existed since 1.1, but it was completely reimplemented in Thymeleaf 3.0
- Since:
- 3.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static charCONDITION_SUFFIX_CHARprivate static charCONDITION_THENELSE_SEPARATOR_CHARprivate ExpressionconditionExpressionprivate ExpressionelseExpressionprivate static org.slf4j.Loggerlogger(package private) static java.lang.String[]OPERATORSprivate static longserialVersionUIDprivate ExpressionthenExpression-
Fields inherited from class org.thymeleaf.standard.expression.Expression
NESTING_END_CHAR, NESTING_START_CHAR, PARSING_PLACEHOLDER_CHAR
-
-
Constructor Summary
Constructors Constructor Description ConditionalExpression(Expression conditionExpression, Expression thenExpression, Expression elseExpression)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ExpressionParsingStatecomposeConditionalExpression(ExpressionParsingState state, int nodeIndex)(package private) static java.lang.ObjectexecuteConditional(IExpressionContext context, ConditionalExpression expression, StandardExpressionExecutionContext expContext)ExpressiongetConditionExpression()ExpressiongetElseExpression()java.lang.StringgetStringRepresentation()Obtain a string representation of the expression.ExpressiongetThenExpression()-
Methods inherited from class org.thymeleaf.standard.expression.ComplexExpression
executeComplex
-
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
CONDITION_SUFFIX_CHAR
private static final char CONDITION_SUFFIX_CHAR
- See Also:
- Constant Field Values
-
CONDITION_THENELSE_SEPARATOR_CHAR
private static final char CONDITION_THENELSE_SEPARATOR_CHAR
- See Also:
- Constant Field Values
-
OPERATORS
static final java.lang.String[] OPERATORS
-
conditionExpression
private final Expression conditionExpression
-
thenExpression
private final Expression thenExpression
-
elseExpression
private final Expression elseExpression
-
-
Constructor Detail
-
ConditionalExpression
public ConditionalExpression(Expression conditionExpression, Expression thenExpression, Expression elseExpression)
-
-
Method Detail
-
getConditionExpression
public Expression getConditionExpression()
-
getThenExpression
public Expression getThenExpression()
-
getElseExpression
public Expression getElseExpression()
-
getStringRepresentation
public java.lang.String getStringRepresentation()
Description copied from interface:IStandardExpressionObtain a string representation of the expression.
- Specified by:
getStringRepresentationin interfaceIStandardExpression- Specified by:
getStringRepresentationin classExpression- Returns:
- the String representation
-
composeConditionalExpression
static ExpressionParsingState composeConditionalExpression(ExpressionParsingState state, int nodeIndex)
-
executeConditional
static java.lang.Object executeConditional(IExpressionContext context, ConditionalExpression expression, StandardExpressionExecutionContext expContext)
-
-