Enum AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup
java.lang.Object
java.lang.Enum<AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup>
net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup
- All Implemented Interfaces:
Serializable, Comparable<AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup>, java.lang.constant.Constable, AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader
- Enclosing interface:
AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader
public static enum AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup
extends Enum<AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup>
implements AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader
A loader that uses a method handle lookup object to load a class. This is implemented as follows:
MethodHandleInfo info = caller.revealDirect(implementation); boolean classData = (Modifier.isProtected(info.getModifiers())&&!VerifyAccess.isSamePackage(caller.lookupClass(), info.getDeclaringClass())) || info.getReferenceKind() == Opcodes.H_INVOKESPECIAL; MethodHandles.Lookup lookup; if (classData) { lookup = caller.defineHiddenClassWithClassData(binaryRepresentation, info, true, MethodHandles.Lookup.ClassOption.NESTMATE, MethodHandles.Lookup.ClassOption.STRONG); } else { lookup = caller.defineHiddenClass(binaryRepresentation, true, MethodHandles.Lookup.ClassOption.NESTMATE, MethodHandles.Lookup.ClassOption.STRONG); }Class<?>lambdaClass = lookup.lookupClass();
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader
AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.Unavailable, AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup, AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingUnsafe -
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(org.objectweb.asm.MethodVisitor methodVisitor) Applies this loader.intReturns the local variable length that is required to implement this loader.intReturns the stack size that is required to implement this loader.static AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookupReturns the enum constant of this type with the specified name.static AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
public static final AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup INSTANCEThe singleton instance.
-
-
Constructor Details
-
UsingMethodHandleLookup
private UsingMethodHandleLookup()
-
-
Method Details
-
values
public static AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup[] values()Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader.UsingMethodHandleLookup valueOf(String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
apply
public void apply(org.objectweb.asm.MethodVisitor methodVisitor) Applies this loader.- Specified by:
applyin interfaceAgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader- Parameters:
methodVisitor- The method visitor to use.
-
getStackSize
public int getStackSize()Returns the stack size that is required to implement this loader.- Specified by:
getStackSizein interfaceAgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader- Returns:
- The stack size that is required to implement this loader.
-
getLocalVariableLength
public int getLocalVariableLength()Returns the local variable length that is required to implement this loader.- Specified by:
getLocalVariableLengthin interfaceAgentBuilder.LambdaInstrumentationStrategy.LambdaMetafactoryFactory.Loader- Returns:
- The local variable length that is required to implement this loader.
-