net.sf.myra.framework
Class ObjectFactory

java.lang.Object
  extended by net.sf.myra.framework.ObjectFactory

public abstract class ObjectFactory
extends java.lang.Object

Utility class to create class instances.

Version:
$Revision$ $Date: 2008-02-08 15:54:20#$
Author:
Fernando Esteban Barril Otero

Constructor Summary
ObjectFactory()
           
 
Method Summary
static java.lang.Object create(java.lang.String className)
          Creates a new object instance of the specified class.
static java.lang.Object create(java.lang.String className, java.lang.Class<?>[] types, java.lang.Object[] parameters)
          Creates a new object 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

ObjectFactory

public ObjectFactory()
Method Detail

create

public static java.lang.Object create(java.lang.String className)
Creates a new object instance of the specified class.

Parameters:
className - the fully qualified class name of the object to be created.
Throws:
java.lang.IllegalArgumentException - if there is any error instantiating an object of the specified class.

create

public static java.lang.Object create(java.lang.String className,
                                      java.lang.Class<?>[] types,
                                      java.lang.Object[] parameters)
Creates a new object instance of the specified class.

Parameters:
className - the fully qualified class name of the object to be created.
Throws:
java.lang.IllegalArgumentException - if there is any error instantiating an object of the specified class.


Copyright © 2013. All Rights Reserved.