|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mates.util.ClassCreator
Wrapper for Java's Reflection API.
Constructor Summary | |
ClassCreator()
|
Method Summary | |
static java.lang.Object |
getClass(java.lang.String class_name)
Returns a new instance of a class from the class' name. |
static java.lang.Object |
getClass(java.lang.String class_name,
java.lang.Class[] parameters,
java.lang.Object[] arguments)
Returns a new instance of a class from the class' name and the arguments for its constructor. |
static java.lang.Object |
invokeMethod(java.lang.Object object,
java.lang.String method_name)
Invokes a method of a class that does not take any arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassCreator()
Method Detail |
public static java.lang.Object getClass(java.lang.String class_name) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.ClassNotFoundException
public static java.lang.Object getClass(java.lang.String class_name, java.lang.Class[] parameters, java.lang.Object[] arguments) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.ClassNotFoundException
class_name
- the name of the class to be instantiatedparameters
- an array of the class types of the arguments.
If this is null, the default constructor will be called.arguments
- an array of arguments to pass to the constructor
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.ClassNotFoundException
public static java.lang.Object invokeMethod(java.lang.Object object, java.lang.String method_name) throws java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
object
- the object from which to call the methodmethod_name
- the name of the method in
object
to call.
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |