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

findDeclaredMethod

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

Find a method with the given method name and the given parameter types, declared on the given class or one of its superclasses. Will return a public, protected, package access, or private method.

Checks Class.getDeclaredMethod, cascading upwards to all superclasses.

Parameters

clazz - the class to check

methodName - the name of the method to find

paramTypes - the parameter types of the method to find

Return
the Method object, or null if not found

See Also
Class#getDeclaredMethod