public class ConstructorHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
instantiate(java.lang.Class clazz)
create a new instance of class clazz.
|
static java.lang.Object |
instantiate(java.lang.reflect.Constructor constructor)
create a new instance of the class represented by the no-argument constructor provided
|
public static java.lang.Object instantiate(java.lang.Class clazz) throws java.lang.InstantiationException
clazz
- the class to instantiatejava.lang.InstantiationException
public static java.lang.Object instantiate(java.lang.reflect.Constructor constructor) throws java.lang.InstantiationException
constructor
- the zero argument constructor for the classjava.lang.InstantiationException
ClassNotPersistenceCapableException
- if the constructor is null or there is an
exception while trying to create a new instance(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30