Package net.bytebuddy.dynamic.loading
Interface ClassInjector.UsingJna.Dispatcher
- All Known Implementing Classes:
ClassInjector.UsingJna.Dispatcher.Unavailable
- Enclosing class:
ClassInjector.UsingJna
protected static interface ClassInjector.UsingJna.Dispatcher
A dispatcher for JNA class injection.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
An action for creating a JNA dispatcher.static class
An unavailable dispatcher for JNA-based class injection. -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> defineClass
(ClassLoader classLoader, String name, byte[] binaryRepresentation, ProtectionDomain protectionDomain) Defines a class.boolean
Checks if this dispatcher is available for use.
-
Method Details
-
isAvailable
boolean isAvailable()Checks if this dispatcher is available for use.- Returns:
true
if this dispatcher is available for use.
-
defineClass
Class<?> defineClass(@MaybeNull ClassLoader classLoader, String name, byte[] binaryRepresentation, @MaybeNull 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.
-