com.projectnine.csvmapper
Class PoundDefineJexlResolver

java.lang.Object
  extended by org.apache.commons.jexl.resolver.FlatResolver
      extended by com.projectnine.csvmapper.PoundDefineJexlResolver
All Implemented Interfaces:
org.apache.commons.jexl.JexlExprResolver

public class PoundDefineJexlResolver
extends org.apache.commons.jexl.resolver.FlatResolver

A custom variable resolver that performs default variable resolution. However, when a JEXL expression of the form '#DEFINE [variableName] = [fully.qualified.class.Name] [constructor,"args"];' this resolver allows JEXL to instantiate new instances of objects and add them to the context.

Author:
robweber

Field Summary
static java.lang.String INTERNAL_QUOTATION_MARK
           
static java.lang.String POUND_DEFINE_EXPRESSION_START
           
 
Fields inherited from class org.apache.commons.jexl.resolver.FlatResolver
noValOnNull
 
Fields inherited from interface org.apache.commons.jexl.JexlExprResolver
NO_VALUE
 
Constructor Summary
PoundDefineJexlResolver()
           
 
Method Summary
 java.lang.Object evaluate(org.apache.commons.jexl.JexlContext context, java.lang.String rawExpression)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POUND_DEFINE_EXPRESSION_START

public static final java.lang.String POUND_DEFINE_EXPRESSION_START
See Also:
Constant Field Values

INTERNAL_QUOTATION_MARK

public static final java.lang.String INTERNAL_QUOTATION_MARK
See Also:
Constant Field Values
Constructor Detail

PoundDefineJexlResolver

public PoundDefineJexlResolver()
Method Detail

evaluate

public java.lang.Object evaluate(org.apache.commons.jexl.JexlContext context,
                                 java.lang.String rawExpression)
Specified by:
evaluate in interface org.apache.commons.jexl.JexlExprResolver
Overrides:
evaluate in class org.apache.commons.jexl.resolver.FlatResolver

main

public static void main(java.lang.String[] args)


Copyright © 2008. All Rights Reserved.