org.apache.commons.ognl.test
Class CompilingPropertyAccessor

java.lang.Object
  extended by org.apache.commons.ognl.ObjectPropertyAccessor
      extended by org.apache.commons.ognl.test.CompilingPropertyAccessor
All Implemented Interfaces:
PropertyAccessor

public class CompilingPropertyAccessor
extends ObjectPropertyAccessor

Implementation of PropertyAccessor that uses Javassist to compile a property accessor specifically tailored to the property.


Nested Class Summary
static interface CompilingPropertyAccessor.Getter
           
 
Constructor Summary
CompilingPropertyAccessor()
           
 
Method Summary
static CompilingPropertyAccessor.Getter generateGetter(OgnlContext context, String code)
           
 Object getPossibleProperty(Map context, Object target, String name)
          Returns OgnlRuntime.NotFound if the property does not exist.
static Class getPrimitiveWrapperClass(Class primitiveClass)
           
 
Methods inherited from class org.apache.commons.ognl.ObjectPropertyAccessor
getProperty, getPropertyClass, getSourceAccessor, getSourceSetter, hasGetProperty, hasGetProperty, hasSetProperty, hasSetProperty, setPossibleProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilingPropertyAccessor

public CompilingPropertyAccessor()
Method Detail

getPrimitiveWrapperClass

public static Class getPrimitiveWrapperClass(Class primitiveClass)

generateGetter

public static CompilingPropertyAccessor.Getter generateGetter(OgnlContext context,
                                                              String code)
                                                       throws OgnlException
Throws:
OgnlException

getPossibleProperty

public Object getPossibleProperty(Map context,
                                  Object target,
                                  String name)
                           throws OgnlException
Returns OgnlRuntime.NotFound if the property does not exist.

Overrides:
getPossibleProperty in class ObjectPropertyAccessor
Throws:
OgnlException


Copyright © 1997-2013 The Apache Software Foundation. All Rights Reserved.