Constructor and Description |
---|
ObjectFactory() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
instantiate(Class<T> expectedClass,
String classname,
Properties info,
boolean tryString,
String stringarg)
Instantiates a class using the appropriate constructor.
|
public static <T> T instantiate(Class<T> expectedClass, String classname, Properties info, boolean tryString, String stringarg) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
classname
- Nam of the class to instantiateinfo
- parameter to pass as PropertiestryString
- weather to look for a single String argument constructorstringarg
- parameter to pass as StringClassNotFoundException
- if something goes wrongSecurityException
- if something goes wrongNoSuchMethodException
- if something goes wrongIllegalArgumentException
- if something goes wrongInstantiationException
- if something goes wrongIllegalAccessException
- if something goes wrongInvocationTargetException
- if something goes wrongCopyright © 2022 PostgreSQL Global Development Group. All rights reserved.