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.InvocationTargetException
Instantiates 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 instantiate
info - parameter to pass as Properties
tryString - whether to look for a single String argument constructor
stringarg - parameter to pass as String
- Returns:
- the instantiated class
- Throws:
java.lang.ClassNotFoundException - if something goes wrong
java.lang.SecurityException - if something goes wrong
java.lang.NoSuchMethodException - if something goes wrong
java.lang.IllegalArgumentException - if something goes wrong
java.lang.InstantiationException - if something goes wrong
java.lang.IllegalAccessException - if something goes wrong
java.lang.reflect.InvocationTargetException - if something goes wrong