Interface NativeMethodHandler

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface NativeMethodHandler
    Handler that emulates a single native or intrinsic JDK method against interpreter state.
    • Method Detail

      • handle

        ConcreteValue handle​(ObjectInstance receiver,
                             ConcreteValue[] args,
                             NativeContext context)
                      throws NativeException
        Emulates the call.
        Parameters:
        receiver - the receiver instance, null for a static method
        args - the argument values
        context - interpreter services the emulation may use
        Returns:
        the call result, null for a void method
        Throws:
        NativeException - to raise a guest exception in place of a result