spring-framework / org.springframework.util / ReflectionUtils / findMethod

findMethod

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

Attempt to find a Method on the supplied class with the supplied name and no parameters. Searches all superclasses up to Object.

Returns null if no Method can be found.

Parameters

clazz - the class to introspect

name - the name of the method

Return
the Method object, or null if none found

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

Attempt to find a Method on the supplied class with the supplied name and parameter types. Searches all superclasses up to Object.

Returns null if no Method can be found.

Parameters

clazz - the class to introspect

name - the name of the method

paramTypes - the parameter types of the method (may be null to indicate any signature)

Return
the Method object, or null if none found