net.sf.json.util
Class NewBeanInstanceStrategy

java.lang.Object
  extended by net.sf.json.util.NewBeanInstanceStrategy

public abstract class NewBeanInstanceStrategy
extends Object

Base class for creating Bean instances.

Author:
Andres Almiray

Field Summary
static NewBeanInstanceStrategy DEFAULT
          Calls Class.newInstance()
 
Constructor Summary
NewBeanInstanceStrategy()
           
 
Method Summary
abstract  Object newInstance(Class target, JSONObject source)
          Creates a new instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final NewBeanInstanceStrategy DEFAULT
Calls Class.newInstance()

Constructor Detail

NewBeanInstanceStrategy

public NewBeanInstanceStrategy()
Method Detail

newInstance

public abstract Object newInstance(Class target,
                                   JSONObject source)
                            throws InstantiationException,
                                   IllegalAccessException,
                                   SecurityException,
                                   NoSuchMethodException,
                                   InvocationTargetException
Creates a new instance.

Parameters:
target - the source class
source - additional properties that may be needed to create the instance
Throws:
InstantiationException
IllegalAccessException
SecurityException
NoSuchMethodException
InvocationTargetException