java.lang.Object
gnu.java.beans.decoder.MethodFinder
- class MethodFinder
- extends java.lang.Object
|
Field Summary |
private static java.util.HashMap |
typeMapping
Provides a mapping between a wrapper class and its corresponding primitive's type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
typeMapping
private static java.util.HashMap typeMapping
- Provides a mapping between a wrapper class and its corresponding primitive's type.
MethodFinder
private MethodFinder()
getMethod
static java.lang.reflect.Method getMethod(java.lang.Class klass,
java.lang.String name,
java.lang.Object[] arguments)
throws java.lang.NoSuchMethodException
- Searches a Method which can accept the given arguments.
getConstructor
static java.lang.reflect.Constructor getConstructor(java.lang.Class klass,
java.lang.Object[] arguments)
throws java.lang.NoSuchMethodException
getArgumentTypes
private static java.lang.Class[] getArgumentTypes(java.lang.Object[] arguments)
- Transforms an array of argument objects into an array of argument types.
For each argument being null the argument is null, too. An argument type
being null means: Accepts everything (although this can be ambigous).
matchingArgumentTypes
private static boolean matchingArgumentTypes(java.lang.Class[] methodArgTypes,
java.lang.Class[] suppliedArgTypes)
- Tests whether the argument types supplied to the method argument types
are assignable. In addition to the assignment specifications this method
handles the primitive's wrapper classes as if they were of their
primitive type (e.g Boolean.class equals Boolean.TYPE).
When a supplied argument type is null it is assumed that no argument
object was supplied for it and the test for this particular parameter will
pass.