public final class ELUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
coerce(Object value,
Class<T> targetType)
Coerce the given object to targetType.
|
static javax.el.ValueExpression |
createValueExpression(javax.faces.context.FacesContext context,
String expression,
boolean literal,
Class<?> expectedType)
Creates value expression from string and stores expression's expected type.
|
static javax.el.ValueExpression |
createValueExpression(String expression)
Create a
ValueExpression with the expected type of Object.class |
static javax.el.ValueExpression |
createValueExpression(String expression,
Class<?> expectedType)
Creates value expression from string and stores expression's expected type
|
static Object |
evaluateValueExpression(javax.el.ValueExpression expression,
javax.el.ELContext elContext) |
static boolean |
isValueReference(String value)
Get EL-enabled value.
|
public static boolean isValueReference(String value)
value
- string to parsepublic static javax.el.ValueExpression createValueExpression(String expression)
ValueExpression
with the expected type of Object.class
expression
- an EL expressionValueExpression
instance based off the provided valueRef
public static javax.el.ValueExpression createValueExpression(String expression, Class<?> expectedType)
expression
- string with EL expressionsexpectedType
- the type expected from expression after evaluationpublic static Object evaluateValueExpression(javax.el.ValueExpression expression, javax.el.ELContext elContext)
public static javax.el.ValueExpression createValueExpression(javax.faces.context.FacesContext context, String expression, boolean literal, Class<?> expectedType)
Creates value expression from string and stores expression's expected type.
If the literal is provided, constant value expression is used instead.
context
- current FacesContext
expression
- string with EL expressionsliteral
- determined if the literal value is requiredexpectedType
- the type expected from expression after evaluationCopyright © 2015 JBoss by Red Hat. All Rights Reserved.