org.apache.commons.jexl.resolver
Class  FlatResolver
java.lang.Object
  |
  +--org.apache.commons.jexl.resolver.FlatResolver
- All Implemented Interfaces: 
- JexlExprResolver
- public class FlatResolver- extends Object- implements JexlExprResolver
Simple resolver to try the expression as-is from the context.
  For example, you could resolve ant-ish properties (foo.bar.woogie)
  using this...
  hint, hint...
- Since: 
- 1.0
- Version: 
- $Id: FlatResolver.java 397542 2006-04-27 13:43:47Z dion $
| Field Summary | 
| protected  boolean | noValOnNullFlag to return NO_VALUE on null from context.
 | 
 
 
| Constructor Summary | 
| FlatResolver()Default CTOR.
 | 
| FlatResolver(boolean valOnNull)CTOR that lets you override the default behavior of
  noValOnNull, which is true.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
noValOnNull
protected boolean noValOnNull
- Flag to return NO_VALUE on null from context.
  this allows jexl to try to evaluate
FlatResolver
public FlatResolver()
- Default CTOR.
FlatResolver
public FlatResolver(boolean valOnNull)
- CTOR that lets you override the default behavior of
  noValOnNull, which is true. (jexl gets a shot after if null)- 
- Parameters:
- valOnNull- Whether NO_VALUE will be returned instead of null.
 
evaluate
public Object evaluate(JexlContext context,
                       String expression)
- Try to resolve expression as-is.- 
- Specified by: 
- evaluatein interface- JexlExprResolver
 
- 
- Parameters:
- context- The context for resolution.
- expression- The flat expression.
- Returns:
- The resolved value.
 
Copyright © 2003-2006 The Apache Software Foundation. All Rights Reserved.