public class ExpressionHelper extends Object
| Constructor and Description |
|---|
ExpressionHelper(ExpressionResolver resolver,
PageContext pageContext) |
ExpressionHelper(ExpressionResolver resolver,
SlingHttpServletRequest servletRequest) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(String expression,
Class<T> expectedType)
Resolves the given expression.
|
<T> T |
get(String expression,
Locale locale,
Class<T> expectedType)
Resolves the given expression, with the given locale.
|
boolean |
getBoolean(String expression)
Resolves the given expression as boolean.
|
boolean |
getBoolean(String expression,
Locale locale)
Resolves the given expression as boolean, with the given locale.
|
String |
getString(String expression)
Resolves the given expression as string.
|
String |
getString(String expression,
Locale locale)
Resolves the given expression as string, with the given locale.
|
public ExpressionHelper(@Nonnull ExpressionResolver resolver, @Nonnull PageContext pageContext)
public ExpressionHelper(@Nonnull ExpressionResolver resolver, @Nonnull SlingHttpServletRequest servletRequest)
public String getString(@CheckForNull String expression)
expression - the expression to be resolvednull when expression
is public String getString(@CheckForNull String expression, @Nonnull Locale locale)
expression - the expression to be resolvedlocale - the localenull when expression
is public boolean getBoolean(@CheckForNull String expression)
expression - the expression to be resolvednull when expression
is public boolean getBoolean(@CheckForNull String expression, @Nonnull Locale locale)
expression - the expression to be resolvedlocale - the localenull when expression
is public <T> T get(@CheckForNull String expression, @Nonnull Class<T> expectedType)
T - the type of the resolved expressionexpression - the expression to be resolvedexpectedType - the expected type of the resolved expressionnull when expression is public <T> T get(@CheckForNull String expression, @Nonnull Locale locale, @Nonnull Class<T> expectedType)
T - the type of the resolved expressionexpression - the expression to be resolvedlocale - the localeexpectedType - the expected type of the resolved expressionnull when expression is Copyright © 2010 - 2020 Adobe. All Rights Reserved