@HashCodeAndEqualsPlugin.Enhance public static class ClassInjector.UsingLookup.Dispatcher.ForJava9CapableVm extends Object implements ClassInjector.UsingLookup.Dispatcher
ClassInjector.UsingLookup.Dispatcher.Creator, ClassInjector.UsingLookup.Dispatcher.ForJava9CapableVm, ClassInjector.UsingLookup.Dispatcher.ForLegacyVm
Modifier | Constructor and Description |
---|---|
protected |
ForJava9CapableVm(Method privateLookupIn,
Method lookupClass,
Method lookupModes,
Method dropLookupMode,
Method defineClass)
Creates a new dispatcher for a Java 9 capable VM.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
defineClass(Object lookup,
byte[] binaryRepresentation)
Defines a class.
|
Object |
dropLookupMode(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(Object lookup)
Returns a lookup objects lookup types.
|
Class<?> |
lookupType(Object lookup)
Returns the lookup type for a given method handle lookup.
|
Object |
resolve(Object lookup,
Class<?> type)
Resolves the supplied lookup instance's access scope for the supplied type.
|
protected ForJava9CapableVm(Method privateLookupIn, Method lookupClass, Method lookupModes, Method dropLookupMode, Method defineClass)
privateLookupIn
- The java.lang.invoke.MethodHandles$#privateLookupIn
method.lookupClass
- The java.lang.invoke.MethodHandles$Lookup#lookupClass
method.lookupModes
- The java.lang.invoke.MethodHandles$Lookup#lookupModes
method.dropLookupMode
- The java.lang.invoke.MethodHandles$Lookup#dropLookupMode
method.defineClass
- The java.lang.invoke.MethodHandles$Lookup#defineClass
method.public boolean isAlive()
isAlive
in interface ClassInjector.UsingLookup.Dispatcher
true
if this dispatcher is alive.public Class<?> lookupType(Object lookup)
lookupType
in interface ClassInjector.UsingLookup.Dispatcher
lookup
- The lookup instance.public int lookupModes(Object lookup)
lookupModes
in interface ClassInjector.UsingLookup.Dispatcher
lookup
- The lookup instance.public Object dropLookupMode(Object lookup, int mode)
dropLookupMode
in interface ClassInjector.UsingLookup.Dispatcher
lookup
- The lookup instance.mode
- The modes to drop.public Object resolve(Object lookup, Class<?> type)
resolve
in interface ClassInjector.UsingLookup.Dispatcher
lookup
- The lookup to use.type
- The type to resolve the scope for.public Class<?> defineClass(Object lookup, byte[] binaryRepresentation)
defineClass
in interface ClassInjector.UsingLookup.Dispatcher
lookup
- The java.lang.invoke.MethodHandles$Lookup
instance to use.binaryRepresentation
- The defined class's binary representation.Copyright © 2014–2018. All rights reserved.