org.apache.commons.jocl
Class ConstructorUtil
public class ConstructorUtil
Miscellaneous Constructor related utility functions.
$Revision: 479137 $ $Date: 2006-11-25 08:51:48 -0700 (Sat, 25 Nov 2006) $static Constructor | getConstructor(Class type, Class[] argTypes)- Returns a
Constructor for the given method signature, or null
if no such Constructor can be found.
|
static Object | invokeConstructor(Class type, Class[] argTypes, Object[] argValues)- Creates a new instance of the specified type
using a
Constructor described by the given parameter types
and values.
|
getConstructor
public static Constructor getConstructor(Class type,
Class[] argTypes) Returns a Constructor for the given method signature, or null
if no such Constructor can be found.
type - the (non-null) type of Object the returned Constructor should createargTypes - a non-null array of types describing the parameters to the Constructor.
- a
Constructor for the given method signature, or null
if no such Constructor can be found.
invokeConstructor
public static Object invokeConstructor(Class type,
Class[] argTypes,
Object[] argValues)
throws InstantiationException,
IllegalAccessException,
InvocationTargetException Creates a new instance of the specified type
using a Constructor described by the given parameter types
and values.
type - the type of Object to be createdargTypes - a non-null array of types describing the parameters to the Constructor.argValues - a non-null array containing the values of the parameters to the Constructor.
- a new instance of the specified type
using a
Constructor described by the given parameter types
and values.
Copyright © 2001-2004 Apache Software Foundation. Documenation generated June 19 2007.