Package org.postgresql.util
Class ObjectFactory
- java.lang.Object
-
- org.postgresql.util.ObjectFactory
-
- Direct Known Subclasses:
MakeSSL
public class ObjectFactory extends java.lang.ObjectHelper class to instantiate objects. Note: the class is NOT public API, so it is subject to change.
-
-
Constructor Summary
Constructors Constructor Description ObjectFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Objectinstantiate(java.lang.String classname, java.util.Properties info, boolean tryString, java.lang.String stringarg)Instantiates a class using the appropriate constructor.
-
-
-
Method Detail
-
instantiate
public static java.lang.Object instantiate(java.lang.String classname, java.util.Properties info, boolean tryString, java.lang.String stringarg) throws java.lang.ClassNotFoundException, java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetExceptionInstantiates a class using the appropriate constructor. If a constructor with a single Propertiesparameter exists, it is used. Otherwise, if tryString is true a constructor with a single String argument is searched if it fails, or tryString is true a no argument constructor is tried.- Parameters:
classname- name of the class to instantiateinfo- parameter to pass as PropertiestryString- whether to look for a single String argument constructorstringarg- parameter to pass as String- Returns:
- the instantiated class
- Throws:
java.lang.ClassNotFoundException- if something goes wrongjava.lang.SecurityException- if something goes wrongjava.lang.NoSuchMethodException- if something goes wrongjava.lang.IllegalArgumentException- if something goes wrongjava.lang.InstantiationException- if something goes wrongjava.lang.IllegalAccessException- if something goes wrongjava.lang.reflect.InvocationTargetException- if something goes wrong
-
-