Example usage for Java org.apache.commons.lang3.reflect MethodUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
Method | getAccessibleMethod(final Class> cls, final String methodName, final Class>... parameterTypes) Returns an accessible method (that is, one that can be invoked via reflection) with given name and parameters. |
Method | getMatchingAccessibleMethod(final Class> cls, final String methodName, final Class>... parameterTypes) Finds an accessible method that matches the given name and has compatible parameters. |
List | getMethodsListWithAnnotation(final Class> cls, final Class extends Annotation> annotationCls) Gets all methods of the given class that are annotated with the given annotation. |
Method[] | getMethodsWithAnnotation(final Class> cls, final Class extends Annotation> annotationCls) Gets all methods of the given class that are annotated with the given annotation. |
Object | invokeExactMethod(final Object object, final String methodName, Object... args) Invokes a method with no parameters. This uses reflection to invoke the method obtained from a call to #getAccessibleMethod (Class,String,Class[])}. |
Object | invokeExactMethod(final Object object, final String methodName) Invokes a method whose parameter types match exactly the object types. This uses reflection to invoke the method obtained from a call to #getAccessibleMethod (Class,String,Class[])}. |
Object | invokeExactStaticMethod(final Class> cls, final String methodName, Object... args) Invokes a static method whose parameter types match exactly the object types. This uses reflection to invoke the method obtained from a call to #getAccessibleMethod(Class,String,Class[]) . |
Object | invokeMethod(final Object object, final String methodName, Object... args) Invokes a named method whose parameter type matches the object type. This method delegates the method search to #getMatchingAccessibleMethod(Class,String,Class[]) . This method supports calls to methods taking primitive parameters via passing in wrapping classes. |
Object | invokeMethod(final Object object, final String methodName) Invokes a named method without parameters. This method delegates the method search to #getMatchingAccessibleMethod(Class,String,Class[]) . This is a convenient wrapper for #invokeMethod(Object object,String methodName,Object[] args,Class[] parameterTypes) . |
Object | invokeMethod(final Object object, final String methodName, Object[] args, Class>[] parameterTypes) Invokes a named method whose parameter type matches the object type. This method delegates the method search to #getMatchingAccessibleMethod(Class,String,Class[]) . This method supports calls to methods taking primitive parameters via passing in wrapping classes. |
Object | invokeStaticMethod(final Class> cls, final String methodName, Object... args) Invokes a named static method whose parameter type matches the object type. This method delegates the method search to #getMatchingAccessibleMethod(Class,String,Class[]) . This method supports calls to methods taking primitive parameters via passing in wrapping classes. |
Object | invokeStaticMethod(final Class> cls, final String methodName, Object[] args, Class>[] parameterTypes) Invokes a named static method whose parameter type matches the object type. This method delegates the method search to #getMatchingAccessibleMethod(Class,String,Class[]) . This method supports calls to methods taking primitive parameters via passing in wrapping classes. |