org.graffiti.util
Class InstanceLoader

java.lang.Object
  extended by org.graffiti.util.InstanceLoader

public class InstanceLoader
extends Object

Represents an instance loader, which can be used to instanciate a class with the given name.

Version:
$Revision: 5767 $

Constructor Summary
InstanceLoader()
           
 
Method Summary
static Object createInstance(Class<?> theClass)
          Returns a new instance of the specified class.
static Object createInstance(Class<?> theClass, Class<?> paramClass, Object param)
          Returns a new instance of the specified class.
static Object createInstance(Class<?> theClass, Object param)
          Returns a new instance of the specified class.
static Object createInstance(Class<?> theClass, String paramClassname, Object param)
          Returns a new instance of the specified class.
static Object createInstance(String name)
          Returns a new instance of the specified class.
static Object createInstance(String name, Object param)
          Returns a new instance of the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceLoader

public InstanceLoader()
Method Detail

createInstance

public static Object createInstance(Class<?> theClass)
                             throws InstanceCreationException
Returns a new instance of the specified class.

Parameters:
theClass - the class to instanciate.
Returns:
DOCUMENT ME!
Throws:
InstanceCreationException - DOCUMENT ME!

createInstance

public static Object createInstance(String name)
                             throws InstanceCreationException
Returns a new instance of the specified class.

Parameters:
name - the name of the class to instanciate.
Returns:
DOCUMENT ME!
Throws:
InstanceCreationException - DOCUMENT ME!

createInstance

public static Object createInstance(String name,
                                    Object param)
                             throws InstanceCreationException
Returns a new instance of the specified class. Uses a constructor taking one argument.

Parameters:
name - the name of the class to instanciate.
param - param
Returns:
DOCUMENT ME!
Throws:
InstanceCreationException - DOCUMENT ME!

createInstance

public static Object createInstance(Class<?> theClass,
                                    Class<?> paramClass,
                                    Object param)
                             throws InstanceCreationException
Returns a new instance of the specified class. Uses a constructor taking one argument.

Parameters:
theClass - the name of the class to instanciate.
paramClass - DOCUMENT ME!
param -
Returns:
DOCUMENT ME!
Throws:
InstanceCreationException - DOCUMENT ME!

createInstance

public static Object createInstance(Class<?> theClass,
                                    String paramClassname,
                                    Object param)
                             throws InstanceCreationException
Returns a new instance of the specified class. Uses a constructor taking one argument.

Parameters:
theClass - the name of the class to instanciate.
paramClassname - DOCUMENT ME!
param - param
Returns:
DOCUMENT ME!
Throws:
InstanceCreationException - DOCUMENT ME!

createInstance

public static Object createInstance(Class<?> theClass,
                                    Object param)
                             throws InstanceCreationException
Returns a new instance of the specified class. Uses a constructor taking one argument.

Parameters:
theClass - the name of the class to instanciate.
param - param
Returns:
DOCUMENT ME!
Throws:
InstanceCreationException - DOCUMENT ME!


Generated at 2012-05-30 11:00:36 PM CEST