Class MethodLookupUtils
java.lang.Object
org.apache.commons.jxpath.util.MethodLookupUtils
Method lookup utilities, which find static and non-static methods as well
as constructors based on a name and list of parameters.
- Version:
- $Revision: 670727 $ $Date: 2008-06-23 15:10:38 -0500 (Mon, 23 Jun 2008) $
- Author:
- Dmitri Plotnikov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConstructorlookupConstructor(Class targetClass, Object[] parameters) Look up a constructor.static MethodlookupMethod(Class targetClass, String name, Object[] parameters) Look up a method.static MethodlookupStaticMethod(Class targetClass, String name, Object[] parameters) Look up a static method.private static intmatchParameterTypes(Class[] types, Object[] parameters) Return a match code of objects to types.private static intReturn a match code between an object and type.
-
Field Details
-
NO_MATCH
private static final int NO_MATCH- See Also:
-
APPROXIMATE_MATCH
private static final int APPROXIMATE_MATCH- See Also:
-
EXACT_MATCH
private static final int EXACT_MATCH- See Also:
-
-
Constructor Details
-
MethodLookupUtils
public MethodLookupUtils()
-
-
Method Details
-
lookupConstructor
Look up a constructor.- Parameters:
targetClass- the class constructedparameters- arguments- Returns:
- Constructor found if any.
-
lookupStaticMethod
-
lookupMethod
-
matchParameterTypes
-
matchType
-