org.exolab.castor.util

Class DefaultObjectFactory

Implemented Interfaces:
ObjectFactory

public class DefaultObjectFactory
extends java.lang.Object
implements ObjectFactory

The default implementation of ObjectFactory used for creating class instances
Version:
$Revision: 1.1 $ $Date: 2003/04/23 06:36:31 $
Author:
Keith Visco
See Also:
ObjectFactory

Method Summary

Object
createInstance(Class type)
Creates a default instance of the given class.
Object
createInstance(Class type, Class[] argTypes, Object[] args)
Creates a default instance of the given class.
Object
createInstance(Class type, Object[] args)
Creates a default instance of the given class.

Method Details

createInstance

public Object createInstance(Class type)
            throws IllegalAccessException,
                   InstantiationException
Creates a default instance of the given class.
Specified by:
createInstance in interface ObjectFactory
Parameters:
type - the Class to create an instance of
Returns:
the new instance of the given class

createInstance

public Object createInstance(Class type,
                             Class[] argTypes,
                             Object[] args)
            throws IllegalAccessException,
                   InstantiationException
Creates a default instance of the given class.
Specified by:
createInstance in interface ObjectFactory
Parameters:
type - the Class to create an instance of
argTypes - the Class types for each argument, used to find the correct constructor
args - the array of arguments to pass to the Class constructor
Returns:
the new instance of the given class

createInstance

public Object createInstance(Class type,
                             Object[] args)
            throws IllegalAccessException,
                   InstantiationException
Creates a default instance of the given class.
Specified by:
createInstance in interface ObjectFactory
Parameters:
type - the Class to create an instance of
args - the array of arguments to pass to the Class constructor
Returns:
the new instance of the given class

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com