asNonvirtualMethod

Unifies usage of callNonvirtual<type>Method methods, returning lambda which internally calls method with appropriate type and returns the result.

Note: If the return type is a primitive type, it cannot be nullable, otherwise it must be nullable.


Unifies usage of callNonvirtual<type>Method methods, returning lambda which internally calls method with appropriate type setting arguments with jArgs and returns the result.

Note: each of the parameters and return types must be not-null if it's a primitive type, otherwise it must be nullable.