Interface ClassInjector.UsingLookup.Dispatcher

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Class<?> defineClass​(java.lang.Object lookup, byte[] binaryRepresentation)
      Defines a class.
      boolean isAlive()
      Indicates if this dispatcher is available on the current VM.
      int lookupModes​(java.lang.Object lookup)
      Returns a lookup objects lookup types.
      java.lang.Class<?> lookupType​(java.lang.Object lookup)
      Returns the lookup type for a given method handle lookup.
      java.lang.Object resolve​(java.lang.Object lookup, java.lang.Class<?> type)
      Resolves the supplied lookup instance's access scope for the supplied type.
    • Method Detail

      • isAlive

        boolean isAlive()
        Indicates if this dispatcher is available on the current VM.
        Returns:
        true if this dispatcher is alive.
      • lookupType

        java.lang.Class<?> lookupType​(java.lang.Object lookup)
        Returns the lookup type for a given method handle lookup.
        Parameters:
        lookup - The lookup instance.
        Returns:
        The lookup type.
      • lookupModes

        int lookupModes​(java.lang.Object lookup)
        Returns a lookup objects lookup types.
        Parameters:
        lookup - The lookup instance.
        Returns:
        The modifiers indicating the instance's lookup modes.
      • resolve

        java.lang.Object resolve​(java.lang.Object lookup,
                                 java.lang.Class<?> type)
        Resolves the supplied lookup instance's access scope for the supplied type.
        Parameters:
        lookup - The lookup to use.
        type - The type to resolve the scope for.
        Returns:
        An appropriate lookup instance.
      • defineClass

        java.lang.Class<?> defineClass​(java.lang.Object lookup,
                                       byte[] binaryRepresentation)
        Defines a class.
        Parameters:
        lookup - The java.lang.invoke.MethodHandles$Lookup instance to use.
        binaryRepresentation - The defined class's binary representation.
        Returns:
        The defined class.