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.Dispatcher
A dispatcher for JNA class injection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ClassInjector.UsingJna.Dispatcher.CreationAction
An action for creating a JNA dispatcher.static class
ClassInjector.UsingJna.Dispatcher.Enabled
An enabled dispatcher for JNA-based class injection.static interface
ClassInjector.UsingJna.Dispatcher.Jvm
A JNA dispatcher for the JVM's JVM_DefineClass method.static class
ClassInjector.UsingJna.Dispatcher.Unavailable
An unavailable dispatcher for JNA-based class injection.static class
ClassInjector.UsingJna.Dispatcher.Windows32BitFunctionMapper
A 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.boolean
isAvailable()
Checks if this dispatcher is available for use.
-
-
-
Method Detail
-
isAvailable
boolean isAvailable()
Checks if this dispatcher is available for use.- Returns:
true
if 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 ornull
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 ornull
if no protection domain should be used.- Returns:
- The class that was defined.
-
-