Class ClassInjector.UsingJna.Dispatcher.Unavailable

java.lang.Object
net.bytebuddy.dynamic.loading.ClassInjector.UsingJna.Dispatcher.Unavailable
All Implemented Interfaces:
ClassInjector.UsingJna.Dispatcher
Enclosing interface:
ClassInjector.UsingJna.Dispatcher

@Enhance public static class ClassInjector.UsingJna.Dispatcher.Unavailable extends Object implements ClassInjector.UsingJna.Dispatcher
An unavailable dispatcher for JNA-based class injection.
  • Field Details

    • error

      private final String error
      The exception's error message when attempting to resolve the JNA dispatcher.
  • Constructor Details

    • Unavailable

      protected Unavailable(String error)
      Creates a new unavailable JNA-based class injector.
      Parameters:
      error - The exception's error message when attempting to resolve the JNA dispatcher.
  • Method Details

    • isAvailable

      public boolean isAvailable()
      Checks if this dispatcher is available for use.
      Specified by:
      isAvailable in interface ClassInjector.UsingJna.Dispatcher
      Returns:
      true if this dispatcher is available for use.
    • defineClass

      public Class<?> defineClass(@MaybeNull ClassLoader classLoader, String name, byte[] binaryRepresentation, @MaybeNull ProtectionDomain protectionDomain)
      Defines a class.
      Specified by:
      defineClass in interface ClassInjector.UsingJna.Dispatcher
      Parameters:
      classLoader - The class loader or null if a class should be injected into the bootstrap loader.
      name - The class's name.
      binaryRepresentation - The class's class file.
      protectionDomain - The protection domain to use or null if no protection domain should be used.
      Returns:
      The class that was defined.