org.apache.commons.jxpath.util
Class MethodLookupUtils
java.lang.Object
org.apache.commons.jxpath.util.MethodLookupUtils
- public class MethodLookupUtils
- extends java.lang.Object
Method lookup utilities, which find static and non-static methods as well
as constructors based on a name and list of parameters.
- Version:
- $Revision: 1.7 $ $Date: 2004/02/29 14:17:43 $
- Author:
- Dmitri Plotnikov
Method Summary |
static java.lang.reflect.Constructor |
lookupConstructor(java.lang.Class targetClass,
java.lang.Object[] parameters)
|
static java.lang.reflect.Method |
lookupMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Object[] parameters)
|
static java.lang.reflect.Method |
lookupStaticMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Object[] parameters)
|
private static int |
matchParameterTypes(java.lang.Class[] types,
java.lang.Object[] parameters)
|
private static int |
matchType(java.lang.Class expected,
java.lang.Object object)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_MATCH
private static final int NO_MATCH
- See Also:
- Constant Field Values
APPROXIMATE_MATCH
private static final int APPROXIMATE_MATCH
- See Also:
- Constant Field Values
EXACT_MATCH
private static final int EXACT_MATCH
- See Also:
- Constant Field Values
EMPTY_ARRAY
private static final java.lang.Object[] EMPTY_ARRAY
MethodLookupUtils
public MethodLookupUtils()
lookupConstructor
public static java.lang.reflect.Constructor lookupConstructor(java.lang.Class targetClass,
java.lang.Object[] parameters)
lookupStaticMethod
public static java.lang.reflect.Method lookupStaticMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Object[] parameters)
lookupMethod
public static java.lang.reflect.Method lookupMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Object[] parameters)
matchParameterTypes
private static int matchParameterTypes(java.lang.Class[] types,
java.lang.Object[] parameters)
matchType
private static int matchType(java.lang.Class expected,
java.lang.Object object)