findMethod

@Nullable
open fun findMethod(clazz: Class<out Any>, name: String): @Nullable 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.

Return

the Method object, or null if none found

Parameters

clazz

the class to introspect

name

the name of the method


@Nullable
open fun findMethod(clazz: Class<out Any>, name: String, paramTypes: @Nullable Array<Class<out Any>>): @Nullable 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.

Return

the Method object, or null if none 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)