com.opensymphony.xwork.util
Class InstantiatingNullHandler

java.lang.Object
  extended bycom.opensymphony.xwork.util.InstantiatingNullHandler
All Implemented Interfaces:
ognl.NullHandler

public class InstantiatingNullHandler
extends Object
implements ognl.NullHandler

Normally does nothing, but if CREATE_NULL_OBJECTS is in the action context with a value of true, then this class will attempt to create null objects when Ognl requests null objects be created.

The following rules are used:

Author:
Matt Ho, Patrick Lightbody

Field Summary
static String CREATE_NULL_OBJECTS
           
 
Constructor Summary
InstantiatingNullHandler()
           
 
Method Summary
protected  Class getCollectionType(Class clazz, String property)
           
 Object nullMethodResult(Map context, Object target, String methodName, Object[] args)
           
 Object nullPropertyValue(Map context, Object target, Object property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATE_NULL_OBJECTS

public static final String CREATE_NULL_OBJECTS
See Also:
Constant Field Values
Constructor Detail

InstantiatingNullHandler

public InstantiatingNullHandler()
Method Detail

nullMethodResult

public Object nullMethodResult(Map context,
                               Object target,
                               String methodName,
                               Object[] args)
Specified by:
nullMethodResult in interface ognl.NullHandler

nullPropertyValue

public Object nullPropertyValue(Map context,
                                Object target,
                                Object property)
Specified by:
nullPropertyValue in interface ognl.NullHandler

getCollectionType

protected Class getCollectionType(Class clazz,
                                  String property)

XWork Project Page