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 enumAn action for creating a JNA dispatcher.static classAn unavailable dispatcher for JNA-based class injection. -
Method Summary
Modifier and TypeMethodDescriptionClass<?> defineClass(ClassLoader classLoader, String name, byte[] binaryRepresentation, ProtectionDomain protectionDomain) Defines a class.booleanChecks if this dispatcher is available for use.
-
Method Details
-
isAvailable
boolean isAvailable()Checks if this dispatcher is available for use.- Returns:
trueif 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 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.
-