Class DelegatingHandler

  • All Implemented Interfaces:
    InvocationHandler

    public final class DelegatingHandler
    extends Object
    implements InvocationHandler
    Invocation handler that routes every call through a user-supplied callback, converting thrown Java exceptions into guest heap exceptions.
    • Method Detail

      • invoke

        public InvocationResult invoke​(MethodEntry method,
                                       ObjectInstance receiver,
                                       ConcreteValue[] args,
                                       InvocationContext context)
        Description copied from interface: InvocationHandler
        Executes a resolved call.
        Specified by:
        invoke in interface InvocationHandler
        Parameters:
        method - the resolved target
        receiver - the instance for an instance call, null for a static call
        args - the argument values in declaration order
        context - the interpreter services available for the duration of the call
        Returns:
        the outcome: a completed value, a guest exception, a delegation, or a frame to push