Package net.bytebuddy.dynamic.loading
Interface ClassInjector.UsingJna.Dispatcher
-
- All Known Implementing Classes:
ClassInjector.UsingJna.Dispatcher.Enabled,ClassInjector.UsingJna.Dispatcher.Unavailable
- Enclosing class:
- ClassInjector.UsingJna
protected static interface ClassInjector.UsingJna.DispatcherA dispatcher for JNA class injection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classClassInjector.UsingJna.Dispatcher.CreationActionAn action for creating a JNA dispatcher.static classClassInjector.UsingJna.Dispatcher.EnabledAn enabled dispatcher for JNA-based class injection.static interfaceClassInjector.UsingJna.Dispatcher.JvmA JNA dispatcher for the JVM's JVM_DefineClass method.static classClassInjector.UsingJna.Dispatcher.UnavailableAn unavailable dispatcher for JNA-based class injection.static classClassInjector.UsingJna.Dispatcher.Windows32BitFunctionMapperA mapper for 32-bit Windows functions where names are defined with different convention.
-
Method Summary
All Methods Instance Methods Abstract 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.booleanisAvailable()Checks if this dispatcher is available for use.
-
-
-
Method Detail
-
isAvailable
boolean isAvailable()
Checks if this dispatcher is available for use.- Returns:
trueif this dispatcher is available for use.
-
defineClass
java.lang.Class<?> defineClass(@MaybeNull java.lang.ClassLoader classLoader, java.lang.String name, byte[] binaryRepresentation, @MaybeNull java.security.ProtectionDomain protectionDomain)
Defines a class.- Parameters:
classLoader- The class loader ornullif 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 ornullif no protection domain should be used.- Returns:
- The class that was defined.
-
-