Interface DirectInvoker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
JIT-constant trampoline for a single
Method.
Not user API. Not an invokedynamic target. Valid for the Method
lifetime, not across MetaMethod wrappers.
Public because generated nestmates of a foreign host (other package,
other loader) must implements this interface. The containing
internal package is japicmp-excluded.
- Since:
- 6.0.0
-
Method Summary
-
Method Details
-
invoke
Invokes the bound method onreceiverwitharguments.Arguments are assumed already coerced (see
MetaMethod.doMethodInvoke) except when aTransformMetaMethodskipped coercion. Generated trampolines require a non-nullargumentsarray (useMetaClassHelper.EMPTY_ARRAYfor no args);CachedMethod.invokeperforms that substitution. Primitive returns are boxed; the caller runsnormalizeBoxedReturn.- Parameters:
receiver- the receiver, ignored for static methodsarguments- the positional arguments (non-null; empty if none)- Returns:
- the boxed result, or
nullforvoid - Throws:
Throwable- the target's thrown exception, unwrapped. A narrower type would wrapErrorand checked exceptions the reflective path leaves asITEcauses.
-