org.openfaces.validation.core
Class Expressions

java.lang.Object
  extended by org.openfaces.validation.core.Expressions
All Implemented Interfaces:
java.io.Serializable

public class Expressions
extends java.lang.Object
implements java.io.Serializable

Expressions

is a utility class that is used to creating and parsing of value and method expressions.

See Also:
Serialized Form

Nested Class Summary
static interface Expressions.MethodExpression<T>
          A method expression - an EL expression that evaluates to a method.
static interface Expressions.ValueExpression<T>
          A value expression - an EL expression that evaluates to an attribute getter or get/set pair.
 
Method Summary
 Expressions.MethodExpression<java.lang.Object> createMethodExpression(java.lang.String expression)
          Create a method expression.
<T> Expressions.MethodExpression<T>
createMethodExpression(java.lang.String expression, java.lang.Class<T> type, java.lang.Class<T>... argTypes)
          Create a method expression.
 Expressions.ValueExpression<java.lang.Object> createValueExpression(java.lang.String expression)
          Create a value expression.
<T> Expressions.ValueExpression<T>
createValueExpression(java.lang.String expression, java.lang.Class<T> type)
          Create a value expression.
 javax.el.ELContext getELContext()
          Get an appropriate ELContext.
 javax.el.ExpressionFactory getExpressionFactory()
          Get the JBoss EL ExpressionFactory
static Expressions instance()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getExpressionFactory

public javax.el.ExpressionFactory getExpressionFactory()
Get the JBoss EL ExpressionFactory


getELContext

public javax.el.ELContext getELContext()
Get an appropriate ELContext. If there is an active JSF request, use JSF's ELContext. Otherwise, use one that we created.


createValueExpression

public Expressions.ValueExpression<java.lang.Object> createValueExpression(java.lang.String expression)
Create a value expression.

Parameters:
expression - a JBoss EL value expression

createMethodExpression

public Expressions.MethodExpression<java.lang.Object> createMethodExpression(java.lang.String expression)
Create a method expression.

Parameters:
expression - a JBoss EL method expression

createValueExpression

public <T> Expressions.ValueExpression<T> createValueExpression(java.lang.String expression,
                                                                java.lang.Class<T> type)
Create a value expression.

Parameters:
expression - a JBoss EL value expression
type - the type of the value

createMethodExpression

public <T> Expressions.MethodExpression<T> createMethodExpression(java.lang.String expression,
                                                                  java.lang.Class<T> type,
                                                                  java.lang.Class<T>... argTypes)
Create a method expression.

Parameters:
expression - a JBoss EL method expression
type - the method return type
argTypes - the method parameter types

instance

public static Expressions instance()


Copyright © 1998-2010 TeamDev Ltd. All Rights Reserved.