org.jboss.seam.core
Class Expressions

java.lang.Object
  extended by org.jboss.seam.core.Expressions
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FacesExpressions

@Scope(value=APPLICATION)
@BypassInterceptors
@Install(precedence=0)
@Name(value="org.jboss.seam.core.expressions")
public class Expressions
extends Object
implements Serializable

Factory for EL method and value expressions. This default implementation uses JBoss EL.

Author:
Gavin King
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.
 
Constructor Summary
Expressions()
           
 
Method Summary
 Expressions.MethodExpression<Object> createMethodExpression(String expression)
          Create a method expression.
<T> Expressions.MethodExpression<T>
createMethodExpression(String expression, Class<T> type, Class... argTypes)
          Create a method expression.
 Expressions.ValueExpression<Object> createValueExpression(String expression)
          Create a value expression.
<T> Expressions.ValueExpression<T>
createValueExpression(String expression, 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()
           
protected  boolean isFacesContextActive()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expressions

public Expressions()
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 create.


createValueExpression

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

Parameters:
expression - a JBoss EL value expression

createMethodExpression

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

Parameters:
expression - a JBoss EL method expression

createValueExpression

public <T> Expressions.ValueExpression<T> createValueExpression(String expression,
                                                                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(String expression,
                                                                  Class<T> type,
                                                                  Class... argTypes)
Create a method expression.

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

isFacesContextActive

protected boolean isFacesContextActive()

instance

public static Expressions instance()


Copyright © 2011 Seam Framework. All Rights Reserved.