public final class MethodUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Method |
getAssignmentCompatibleMethod(Class<?> clazz,
String candidateMethodName,
Class<?>[] candidateParameterTypes)
A replacement for
Class.getMethod(java.lang.String, java.lang.Class<?>...) with extended capability. |
public static Method getAssignmentCompatibleMethod(Class<?> clazz, String candidateMethodName, Class<?>[] candidateParameterTypes) throws NoSuchMethodException
Class.getMethod(java.lang.String, java.lang.Class<?>...)
with extended capability.
This method returns parameter-list assignment-compatible method as well as exact-signature matching method.
clazz
- The class which will be queried for the method.candidateMethodName
- Name of the method been looked for.candidateParameterTypes
- Types of the parameters in the signature of the method being loooked for.NoSuchMethodException
- when the method cannot be foundCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.