org.apache.shindig.expressions
Class Expressions

java.lang.Object
  extended by org.apache.shindig.expressions.Expressions

public class Expressions
extends Object

A facade to the expressions functionality.


Constructor Summary
Expressions(Functions functions, CacheProvider cacheProvider, ELTypeConverter typeConverter, ExpressionProvider expProvider)
           
 
Method Summary
 javax.el.ValueExpression constant(Object value, Class<?> type)
           
static Expressions forTesting()
          Returns an instance of Expressions that doesn't require any functions or perform any caching.
static Expressions forTesting(Functions functions)
          Returns an instance of Expressions that doesn't require any functions or perform any caching.
 javax.el.ELContext newELContext(javax.el.ELResolver... customResolvers)
          Creates an ELContext.
 javax.el.ValueExpression parse(String expression, Class<?> type)
          Parse a value expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expressions

@Inject
public Expressions(Functions functions,
                          CacheProvider cacheProvider,
                          ELTypeConverter typeConverter,
                          ExpressionProvider expProvider)
Method Detail

forTesting

public static Expressions forTesting(Functions functions)
Returns an instance of Expressions that doesn't require any functions or perform any caching. Use only for testing.


forTesting

public static Expressions forTesting()
Returns an instance of Expressions that doesn't require any functions or perform any caching. Use only for testing.


newELContext

public javax.el.ELContext newELContext(javax.el.ELResolver... customResolvers)
Creates an ELContext.

Parameters:
customResolvers - resolvers to be added to the chain

parse

public javax.el.ValueExpression parse(String expression,
                                      Class<?> type)
Parse a value expression.

Parameters:
expression - the string expression. This may be a literal without any expressions.
type - the desired coercion type.
Returns:
a ValueExpression corresponding to the expression

constant

public javax.el.ValueExpression constant(Object value,
                                         Class<?> type)


Copyright © 2007-2012. All Rights Reserved.