protected static interface ClassInjector.UsingLookup.Dispatcher
| Modifier and Type | Interface and Description |
|---|---|
static class |
ClassInjector.UsingLookup.Dispatcher.Creator
An action for defining a dispatcher.
|
static class |
ClassInjector.UsingLookup.Dispatcher.ForJava9CapableVm
A dispatcher for a Java 9 capable VM that supports class definition via method handles.
|
static class |
ClassInjector.UsingLookup.Dispatcher.ForLegacyVm
A dispatcher for a legacy VM that does not support class definition via method handles.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
defineClass(java.lang.Object lookup,
byte[] binaryRepresentation)
Defines a class.
|
java.lang.Object |
dropLookupMode(java.lang.Object lookup,
int mode)
Drops a given lookup mode from a lookup instance.
|
boolean |
isAlive()
Indicates if this dispatcher is available on the current VM.
|
int |
lookupModes(java.lang.Object lookup)
Returns a lookup objects lookup types.
|
java.lang.Class<?> |
lookupType(java.lang.Object lookup)
Returns the lookup type for a given method handle lookup.
|
java.lang.Object |
resolve(java.lang.Object lookup,
java.lang.Class<?> type)
Resolves the supplied lookup instance's access scope for the supplied type.
|
boolean isAlive()
true if this dispatcher is alive.java.lang.Class<?> lookupType(java.lang.Object lookup)
lookup - The lookup instance.int lookupModes(java.lang.Object lookup)
lookup - The lookup instance.java.lang.Object dropLookupMode(java.lang.Object lookup,
int mode)
lookup - The lookup instance.mode - The modes to drop.java.lang.Object resolve(java.lang.Object lookup,
java.lang.Class<?> type)
lookup - The lookup to use.type - The type to resolve the scope for.java.lang.Class<?> defineClass(java.lang.Object lookup,
byte[] binaryRepresentation)
lookup - The java.lang.invoke.MethodHandles$Lookup instance to use.binaryRepresentation - The defined class's binary representation.