|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.core.util.ReflectionHelper
public class ReflectionHelper
| Constructor Summary | |
|---|---|
ReflectionHelper(java.lang.Class targetClass)
Construct a ReflectionHelper instance that cache's some information about the target class. |
|
| Method Summary | |
|---|---|
static java.lang.Object |
create(java.lang.String className,
java.util.Collection ctorObjs,
java.lang.ClassLoader classLoader)
Helper method to create an instance of the class using the appropriate constructor based on the ctorObjs passed. |
static java.lang.Object |
create(java.lang.String className,
java.lang.Object[] ctorObjs,
java.lang.Class<?>[] argTypes,
java.lang.ClassLoader classLoader)
|
java.lang.reflect.Method |
findBestMethodOnTarget(java.lang.String methodName,
java.lang.Object[] arguments)
Find the best method on the target class that matches the signature specified with the specified name and the list of arguments. |
java.lang.reflect.Method |
findBestMethodWithSignature(java.lang.String methodName,
java.util.List argumentsClasses)
Find the best method on the target class that matches the signature specified with the specified name and the list of argument classes. |
java.lang.reflect.Method |
findBestMethodWithSignature(java.lang.String methodName,
java.lang.Object[] argumentsClasses)
Find the best method on the target class that matches the signature specified with the specified name and the list of argument classes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectionHelper(java.lang.Class targetClass)
targetClass - the target class
java.lang.IllegalArgumentException - if the target class is null| Method Detail |
|---|
public java.lang.reflect.Method findBestMethodOnTarget(java.lang.String methodName,
java.lang.Object[] arguments)
throws java.lang.NoSuchMethodException,
java.lang.SecurityException
This method is unable to find methods with signatures that include both
primitive arguments and arguments that are instances of Number
or its subclasses.
methodName - the name of the method that is to be invoked.arguments - the array of Object instances that correspond
to the arguments passed to the method.
java.lang.NoSuchMethodException - if a matching method is not found.
java.lang.SecurityException - if access to the information is denied.
public java.lang.reflect.Method findBestMethodWithSignature(java.lang.String methodName,
java.lang.Object[] argumentsClasses)
throws java.lang.NoSuchMethodException,
java.lang.SecurityException
methodName - the name of the method that is to be invoked.argumentsClasses - the list of Class instances that correspond
to the classes for each argument passed to the method.
java.lang.NoSuchMethodException - if a matching method is not found.
java.lang.SecurityException - if access to the information is denied.
public java.lang.reflect.Method findBestMethodWithSignature(java.lang.String methodName,
java.util.List argumentsClasses)
throws java.lang.NoSuchMethodException,
java.lang.SecurityException
methodName - the name of the method that is to be invoked.argumentsClasses - the list of Class instances that correspond
to the classes for each argument passed to the method.
java.lang.NoSuchMethodException - if a matching method is not found.
java.lang.SecurityException - if access to the information is denied.
public static final java.lang.Object create(java.lang.String className,
java.util.Collection ctorObjs,
java.lang.ClassLoader classLoader)
throws MetaMatrixCoreException
className - is the class to instantiatectorObjs - are the objects to pass to the constructor; optional, nullableclassLoader - the class loader to use; may be null if the current
class loader is to be used
MetaMatrixCoreException - if an error occurrs instantiating the class
public static final java.lang.Object create(java.lang.String className,
java.lang.Object[] ctorObjs,
java.lang.Class<?>[] argTypes,
java.lang.ClassLoader classLoader)
throws MetaMatrixCoreException
MetaMatrixCoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||