spring-framework / org.springframework.beans / BeanUtils / findDeclaredMethodWithMinimalParameters

findDeclaredMethodWithMinimalParameters

@Nullable open static fun findDeclaredMethodWithMinimalParameters(clazz: Class<*>, methodName: String): Method

Find a method with the given method name and minimal parameters (best case: none), declared on the given class or one of its superclasses. Will return a public, protected, package access, or private method.

Checks Class.getDeclaredMethods, cascading upwards to all superclasses.

Parameters

clazz - the class to check

methodName - the name of the method to find

Exceptions

IllegalArgumentException - if methods of the given name were found but could not be resolved to a unique method with minimal parameters

Return
the Method object, or null if not found

See Also
Class#getDeclaredMethods