public class ClassUtils extends Object
Constructor and Description |
---|
ClassUtils() |
Modifier and Type | Method and Description |
---|---|
static Class |
getClass(String name)
Retrieves the
Class object with the given name. |
static Class |
getClass(String name,
boolean exit)
Retrieves the
Class object with the given name. |
static Classifier |
getClassifier(String name)
Retrieve a
Classifier by name using the no-argument constructor. |
static Classifier |
getClassifier(String name,
boolean exit)
Retrieve a
Classifier by name using the no-argument constructor. |
static Classifier |
getClassifier(String name,
Class[] paramTypes,
Object[] arguments)
Retrieve a
Classifier by name using a constructor with arguments. |
static Classifier |
getClassifier(String name,
Class[] paramTypes,
Object[] arguments,
boolean exit)
Retrieve a
Classifier by name using a constructor with arguments. |
static Constructor |
getConstructor(String name,
Class[] paramTypes)
Retrieve the constructor of the given class with the given parameter types.
|
static Constructor |
getConstructor(String name,
Class[] paramTypes,
boolean exit)
Retrieve the constructor of the given class with the given parameter types.
|
static Constructor |
getConstructor(String name,
String[] paramNames)
Retrieve the constructor of the given class with the given parameter type names.
|
static Constructor |
getConstructor(String name,
String[] paramNames,
boolean exit)
Retrieve the constructor of the given class with the given parameter type names.
|
static Learner |
getLearner(String name)
Retrieve a
Learner by name using the no-argument constructor. |
static Learner |
getLearner(String name,
boolean exit)
Retrieve a
Learner by name using the no-argument constructor. |
static Learner |
getLearner(String name,
Class[] paramTypes,
Object[] arguments)
Retrieve a
Learner by name using a constructor with arguments. |
static Learner |
getLearner(String name,
Class[] paramTypes,
Object[] arguments,
boolean exit)
Retrieve a
Learner by name using a constructor with arguments. |
static Parser |
getParser(String name)
Retrieve a
Parser by name using the no-argument constructor. |
static Parser |
getParser(String name,
boolean exit)
Retrieve a
Parser by name using the no-argument constructor. |
static Parser |
getParser(String name,
Class[] paramTypes,
Object[] arguments)
Retrieve a
Parser by name using a constructor with arguments. |
static Parser |
getParser(String name,
Class[] paramTypes,
Object[] arguments,
boolean exit)
Retrieve a
Parser by name using a constructor with arguments. |
public static Class getClass(String name)
Class
object with the given name. If there is any exception thrown
during retrieval, the program will print an error message to STDERR
and
terminate via System.exit(1)
.name
- The fully qualified name of the class.public static Class getClass(String name, boolean exit)
Class
object with the given name.name
- The fully qualified name of the class.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Constructor getConstructor(String name, Class[] paramTypes)
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.public static Constructor getConstructor(String name, String[] paramNames)
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.paramNames
- The names of the types of the constructor's parameters.public static Constructor getConstructor(String name, String[] paramNames, boolean exit)
name
- The fully qualified name of the class.paramNames
- The names of the types of the constructor's parameters.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Constructor getConstructor(String name, Class[] paramTypes, boolean exit)
name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Classifier getClassifier(String name)
Classifier
by name using the no-argument constructor. If there is any
exception thrown during retrieval, the program will print an error message to
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.public static Classifier getClassifier(String name, boolean exit)
Classifier
by name using the no-argument constructor.name
- The fully qualified name of the class.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Classifier getClassifier(String name, Class[] paramTypes, Object[] arguments)
Classifier
by name using a constructor with arguments. If there is
any exception thrown during retrieval, the program will print an error message to
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.arguments
- The arguments to send to the constructor.public static Classifier getClassifier(String name, Class[] paramTypes, Object[] arguments, boolean exit)
Classifier
by name using a constructor with arguments.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.arguments
- The arguments to send to the constructor.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Learner getLearner(String name)
Learner
by name using the no-argument constructor. If there is any
exception thrown during retrieval, the program will print an error message to
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.public static Learner getLearner(String name, boolean exit)
Learner
by name using the no-argument constructor.name
- The fully qualified name of the class.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Learner getLearner(String name, Class[] paramTypes, Object[] arguments)
Learner
by name using a constructor with arguments. If there is any
exception thrown during retrieval, the program will print an error message to
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.arguments
- The arguments to send to the constructor.public static Learner getLearner(String name, Class[] paramTypes, Object[] arguments, boolean exit)
Learner
by name using a constructor with arguments.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.arguments
- The arguments to send to the constructor.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Parser getParser(String name)
Parser
by name using the no-argument constructor. If there is any
exception thrown during retrieval, the program will print an error message to
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.public static Parser getParser(String name, boolean exit)
Parser
by name using the no-argument constructor.name
- The fully qualified name of the class.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.public static Parser getParser(String name, Class[] paramTypes, Object[] arguments)
Parser
by name using a constructor with arguments. If there is any
exception thrown during retrieval, the program will print an error message to
STDERR
and terminate via System.exit(1)
.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.arguments
- The arguments to send to the constructor.public static Parser getParser(String name, Class[] paramTypes, Object[] arguments, boolean exit)
Parser
by name using a constructor with arguments.name
- The fully qualified name of the class.paramTypes
- The Class
es representing the types of the constructor's
parameters.arguments
- The arguments to send to the constructor.exit
- Whether or not to System.exit(1)
on an exception.null
if an exception was caught.Copyright © 2016. All rights reserved.