Class DefaultExpression
- java.lang.Object
-
- org.thymeleaf.standard.expression.Expression
-
- org.thymeleaf.standard.expression.ComplexExpression
-
- org.thymeleaf.standard.expression.DefaultExpression
-
- All Implemented Interfaces:
java.io.Serializable,IStandardExpression
public final class DefaultExpression extends ComplexExpression
Default (if-null-then) 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 ExpressiondefaultExpressionprivate static org.slf4j.Loggerloggerprivate static java.lang.StringOPERATOR(package private) static java.lang.String[]OPERATORSprivate ExpressionqueriedExpressionprivate static longserialVersionUID-
Fields inherited from class org.thymeleaf.standard.expression.Expression
NESTING_END_CHAR, NESTING_START_CHAR, PARSING_PLACEHOLDER_CHAR
-
-
Constructor Summary
Constructors Constructor Description DefaultExpression(Expression queriedExpression, Expression defaultExpression)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ExpressionParsingStatecomposeDefaultExpression(ExpressionParsingState state, int nodeIndex)(package private) static java.lang.ObjectexecuteDefault(IExpressionContext context, DefaultExpression expression, StandardExpressionExecutionContext expContext)ExpressiongetDefaultExpression()ExpressiongetQueriedExpression()java.lang.StringgetStringRepresentation()Obtain a string representation of the expression.-
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
-
OPERATOR
private static final java.lang.String OPERATOR
- See Also:
- Constant Field Values
-
OPERATORS
static final java.lang.String[] OPERATORS
-
queriedExpression
private final Expression queriedExpression
-
defaultExpression
private final Expression defaultExpression
-
-
Constructor Detail
-
DefaultExpression
public DefaultExpression(Expression queriedExpression, Expression defaultExpression)
-
-
Method Detail
-
getQueriedExpression
public Expression getQueriedExpression()
-
getDefaultExpression
public Expression getDefaultExpression()
-
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
-
composeDefaultExpression
static ExpressionParsingState composeDefaultExpression(ExpressionParsingState state, int nodeIndex)
-
executeDefault
static java.lang.Object executeDefault(IExpressionContext context, DefaultExpression expression, StandardExpressionExecutionContext expContext)
-
-