invokeMethod

fun invokeMethod(obj: Any, methodName: String, returnType: Class<*>? = null, paramTypes: ParamTypes = paramTypes(), params: Params = params()): Any?

Invoke the object method

Return

method result

Parameters

obj

object

methodName

method name

returnType

return type (or null if ignore)

paramTypes

method param types

params

method params

Throws

if the method is not found

if the paramTypes size != params size