invoke

inline operator fun invoke(receiver: T?, name: String, argumentsBuilder: ArgumentsBuilder = {}): Any?(source)

Call the single function named name with receiver and argumentsBuilder.

If the function is static, receiver is ignored. receiver must be non-null for non-static functions, or be set in argumentsBuilder.

See also

Throws

if the function cannot be invoked or is suspending.

if no function with that name exists.

if more than one function with that name exist.


inline operator fun invoke(argumentsBuilder: ArgumentsBuilder = {}): T(source)

Calls the primary constructor of this class with argumentsBuilder.

See also

Throws

if the class has no primary constructor or it cannot be invoked.