public class ExpressionHelper
extends java.lang.Object
Constructor and Description |
---|
ExpressionHelper(ExpressionResolver resolver,
javax.servlet.jsp.PageContext pageContext) |
ExpressionHelper(ExpressionResolver resolver,
SlingHttpServletRequest servletRequest) |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(java.lang.String expression,
java.lang.Class<T> expectedType)
Resolves the given expression.
|
<T> T |
get(java.lang.String expression,
java.util.Locale locale,
java.lang.Class<T> expectedType)
Resolves the given expression, with the given locale.
|
boolean |
getBoolean(java.lang.String expression)
Resolves the given expression as boolean.
|
boolean |
getBoolean(java.lang.String expression,
java.util.Locale locale)
Resolves the given expression as boolean, with the given locale.
|
java.lang.String |
getString(java.lang.String expression)
Resolves the given expression as string.
|
java.lang.String |
getString(java.lang.String expression,
java.util.Locale locale)
Resolves the given expression as string, with the given locale.
|
public ExpressionHelper(@Nonnull ExpressionResolver resolver, @Nonnull javax.servlet.jsp.PageContext pageContext)
public ExpressionHelper(@Nonnull ExpressionResolver resolver, @Nonnull SlingHttpServletRequest servletRequest)
public java.lang.String getString(@CheckForNull java.lang.String expression)
expression
- the expression to be resolvednull
when expression
is public java.lang.String getString(@CheckForNull java.lang.String expression, @Nonnull java.util.Locale locale)
expression
- the expression to be resolvedlocale
- the localenull
when expression
is public boolean getBoolean(@CheckForNull java.lang.String expression)
expression
- the expression to be resolvednull
when expression
is public boolean getBoolean(@CheckForNull java.lang.String expression, @Nonnull java.util.Locale locale)
expression
- the expression to be resolvedlocale
- the localenull
when expression
is public <T> T get(@CheckForNull java.lang.String expression, @Nonnull java.lang.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 java.lang.String expression, @Nonnull java.util.Locale locale, @Nonnull java.lang.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