@HashCodeAndEqualsPlugin.Enhance public static class ClassInjector.UsingUnsafe.Dispatcher.Unavailable extends java.lang.Object implements ClassInjector.UsingUnsafe.Dispatcher, ClassInjector.UsingUnsafe.Dispatcher.Initializable
ClassInjector.UsingUnsafe.Dispatcher.CreationAction, ClassInjector.UsingUnsafe.Dispatcher.Enabled, ClassInjector.UsingUnsafe.Dispatcher.Initializable, ClassInjector.UsingUnsafe.Dispatcher.Unavailable| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
message
The reason why this dispatcher is not available.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Unavailable(java.lang.String message)
Creates a disabled dispatcher.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
defineClass(java.lang.ClassLoader classLoader,
java.lang.String name,
byte[] binaryRepresentation,
java.security.ProtectionDomain protectionDomain)
Defines a class.
|
ClassInjector.UsingUnsafe.Dispatcher |
initialize()
Initializes the dispatcher.
|
boolean |
isAvailable()
Checks if unsafe class injection is available on the current VM.
|
private final java.lang.String message
protected Unavailable(java.lang.String message)
message - The reason why this dispatcher is not available.public boolean isAvailable()
isAvailable in interface ClassInjector.UsingUnsafe.Dispatcher.Initializabletrue if unsafe class injection is available.public ClassInjector.UsingUnsafe.Dispatcher initialize()
initialize in interface ClassInjector.UsingUnsafe.Dispatcher.Initializablepublic java.lang.Class<?> defineClass(java.lang.ClassLoader classLoader,
java.lang.String name,
byte[] binaryRepresentation,
java.security.ProtectionDomain protectionDomain)
defineClass in interface ClassInjector.UsingUnsafe.DispatcherclassLoader - 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.