invokeMethod

@Nullable
open fun invokeMethod(method: Method, @Nullable target: @Nullable Any): @Nullable Any

Invoke the specified Method against the supplied target object with no arguments. The target object can be null when invoking a static Method.

Thrown exceptions are handled via a call to handleReflectionException.

Return

the invocation result, if any

Parameters

method

the method to invoke

target

the target object to invoke the method on

See also


@Nullable
open fun invokeMethod(method: Method, @Nullable target: @Nullable Any, @Nullable args: Array<@Nullable Any>): @Nullable Any

Invoke the specified Method against the supplied target object with the supplied arguments. The target object can be null when invoking a static Method.

Thrown exceptions are handled via a call to handleReflectionException.

Return

the invocation result, if any

Parameters

method

the method to invoke

target

the target object to invoke the method on

args

the invocation arguments (may be null)