| java.lang.Object org.apache.bsf.util.MethodUtils
MethodUtils | public class MethodUtils (Code) | | This file is a collection of reflection utilities for dealing with
methods and constructors.
author: Sanjiva Weerawarana author: Joseph Kesselman |
entryGetModifiers | static int entryGetModifiers(Object entry)(Code) | | Utility function: obtain common data from either Method or
Constructor. (In lieu of an EntryPoint interface.)
|
entryGetName | static String entryGetName(Object entry)(Code) | | Utility function: obtain common data from either Method or
Constructor. (In lieu of an EntryPoint interface.)
|
entryGetParameterTypes | static Class[] entryGetParameterTypes(Object entry)(Code) | | Utility function: obtain common data from either Method or
Constructor. (In lieu of an EntryPoint interface.)
|
entryToString | static String entryToString(Object entry)(Code) | | Utility function: obtain common data from either Method or
Constructor. (In lieu of an EntryPoint interface.)
|
getConstructor | public static Constructor getConstructor(Class targetClass, Class[] argTypes) throws SecurityException, NoSuchMethodException(Code) | | Class.getConstructor() finds only the entry point (if any)
_exactly_ matching the specified argument types. Our implmentation
can decide between several imperfect matches, using the same
search algorithm as the Java compiler.
Note that all constructors are static by definition, so
isStaticReference is true.
exception: NoSuchMethodException - if constructor not found. |
getMethod | public static Method getMethod(Object target, String methodName, Class[] argTypes) throws SecurityException, NoSuchMethodException(Code) | | Class.getMethod() finds only the entry point (if any) _exactly_
matching the specified argument types. Our implmentation can
decide between several imperfect matches, using the same search
algorithm as the Java compiler.
This version emulates the compiler behavior by allowing lookup to
be performed against either a class or an instance -- classname.foo()
must be a static method call, instance.foo() can invoke either static
or instance methods.
Parameters: target - object on which call is to be made Parameters: methodName - name of method I'm lookin' for Parameters: argTypes - array of argument types of method the desired method exception: SecurityException - if security violation exception: NoSuchMethodException - if no such method |
|
|