Class StandardExpressionExecutionContext
- java.lang.Object
-
- org.thymeleaf.standard.expression.StandardExpressionExecutionContext
-
public final class StandardExpressionExecutionContext extends java.lang.ObjectContext class that contains several conditions that might be of interest to the expression executor (like for instance, whether the expression comes from preprocessing or not)
Note a class with this name existed since 2.0.16, but it was completely reimplemented in Thymeleaf 3.0
- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private booleanforbidUnsafeExpressionResultsstatic StandardExpressionExecutionContextNORMALprivate static StandardExpressionExecutionContextNORMAL_WITH_TYPE_CONVERSIONprivate booleanperformTypeConversionstatic StandardExpressionExecutionContextRESTRICTEDstatic StandardExpressionExecutionContextRESTRICTED_FORBID_UNSAFE_EXP_RESULTSprivate static StandardExpressionExecutionContextRESTRICTED_FORBID_UNSAFE_EXP_RESULTS_WITH_TYPE_CONVERSIONprivate static StandardExpressionExecutionContextRESTRICTED_WITH_TYPE_CONVERSIONprivate booleanrestrictInstantiationAndStaticprivate booleanrestrictVariableAccess
-
Constructor Summary
Constructors Modifier Constructor Description privateStandardExpressionExecutionContext(boolean restrictVariableAccess, boolean restrictInstantiationAndStatic, boolean forbidUnsafeExpressionResults, boolean performTypeConversion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetForbidUnsafeExpressionResults()booleangetPerformTypeConversion()booleangetRestrictInstantiationAndStatic()Restricts whether this execution context restricts the instantiation of new objects and the access to static classes.booleangetRestrictVariableAccess()StandardExpressionExecutionContextwithoutTypeConversion()StandardExpressionExecutionContextwithTypeConversion()
-
-
-
Field Detail
-
RESTRICTED
public static final StandardExpressionExecutionContext RESTRICTED
-
RESTRICTED_FORBID_UNSAFE_EXP_RESULTS
public static final StandardExpressionExecutionContext RESTRICTED_FORBID_UNSAFE_EXP_RESULTS
-
NORMAL
public static final StandardExpressionExecutionContext NORMAL
-
RESTRICTED_WITH_TYPE_CONVERSION
private static final StandardExpressionExecutionContext RESTRICTED_WITH_TYPE_CONVERSION
-
RESTRICTED_FORBID_UNSAFE_EXP_RESULTS_WITH_TYPE_CONVERSION
private static final StandardExpressionExecutionContext RESTRICTED_FORBID_UNSAFE_EXP_RESULTS_WITH_TYPE_CONVERSION
-
NORMAL_WITH_TYPE_CONVERSION
private static final StandardExpressionExecutionContext NORMAL_WITH_TYPE_CONVERSION
-
restrictVariableAccess
private final boolean restrictVariableAccess
-
restrictInstantiationAndStatic
private final boolean restrictInstantiationAndStatic
-
forbidUnsafeExpressionResults
private final boolean forbidUnsafeExpressionResults
-
performTypeConversion
private final boolean performTypeConversion
-
-
Method Detail
-
getRestrictVariableAccess
public boolean getRestrictVariableAccess()
-
getRestrictInstantiationAndStatic
public boolean getRestrictInstantiationAndStatic()
Restricts whether this execution context restricts the instantiation of new objects and the access to static classes.- Returns:
- Whether this restriction should be applied or not.
- Since:
- 3.0.12
-
getForbidUnsafeExpressionResults
public boolean getForbidUnsafeExpressionResults()
-
getPerformTypeConversion
public boolean getPerformTypeConversion()
-
withoutTypeConversion
public StandardExpressionExecutionContext withoutTypeConversion()
-
withTypeConversion
public StandardExpressionExecutionContext withTypeConversion()
-
-