getDeclaredMethod

fun getDeclaredMethod(name: String, vararg parameterTypes: KClass<*>): Method
fun getDeclaredMethod(name: String, vararg parameterTypes: Class<*>): Method

Finds a declared method with the given name consuming given parameterTypes.

Return

a Method matching the criteria.

Parameters

name

name of the method.

parameterTypes

types of the method parameters.

Throws

ReflectionException

if unable to find the method.