Package net.bytebuddy.dynamic.loading
Interface ClassInjector.UsingUnsafe.Dispatcher
- All Known Implementing Classes:
ClassInjector.UsingUnsafe.Dispatcher.Enabled
,ClassInjector.UsingUnsafe.Dispatcher.Unavailable
- Enclosing class:
- ClassInjector.UsingUnsafe
protected static interface ClassInjector.UsingUnsafe.Dispatcher
A dispatcher for using
sun.misc.Unsafe
or jdk.internal.misc.Unsafe
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
A privileged action for creating a dispatcher.static class
An enabled dispatcher.static interface
A class injection dispatcher that is not yet initialized.static class
A disabled dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
defineClass
(ClassLoader classLoader, String name, byte[] binaryRepresentation, ProtectionDomain protectionDomain) Defines a class.
-
Method Details
-
defineClass
Class<?> defineClass(@MaybeNull ClassLoader classLoader, String name, byte[] binaryRepresentation, @MaybeNull ProtectionDomain protectionDomain) Defines a class.- Parameters:
classLoader
- The class loader to inject the class into.name
- The type's name.binaryRepresentation
- The type's binary representation.protectionDomain
- The type's protection domain.- Returns:
- The defined class.
-