Class ClassInjector.UsingJna.Dispatcher.Unavailable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String error
      The exception's error message when attempting to resolve the JNA dispatcher.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Unavailable​(java.lang.String error)
      Creates a new unavailable JNA-based class injector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> defineClass​(java.lang.ClassLoader classLoader, java.lang.String name, byte[] binaryRepresentation, java.security.ProtectionDomain protectionDomain)
      Defines a class.
      boolean isAvailable()
      Checks if this dispatcher is available for use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • error

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

      • Unavailable

        protected Unavailable​(java.lang.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 Detail

      • 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 java.lang.Class<?> defineClass​(@MaybeNull
                                              java.lang.ClassLoader classLoader,
                                              java.lang.String name,
                                              byte[] binaryRepresentation,
                                              @MaybeNull
                                              java.security.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.