Package net.bytebuddy.implementation
Enum Implementation.Context.FrameGeneration
- java.lang.Object
-
- java.lang.Enum<Implementation.Context.FrameGeneration>
-
- net.bytebuddy.implementation.Implementation.Context.FrameGeneration
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Implementation.Context.FrameGeneration>
- Enclosing interface:
- Implementation.Context
public static enum Implementation.Context.FrameGeneration extends java.lang.Enum<Implementation.Context.FrameGeneration>
Indicates the frame generation being applied.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
FrameGeneration(boolean active)
Creates a new frame generation type.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
append(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> appended, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_APPEND
frame.void
chop(org.objectweb.asm.MethodVisitor methodVisitor, int chopped, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_CHOP
frame.void
full(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> stackValues, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_FULL
frame.protected abstract void
generate(org.objectweb.asm.MethodVisitor methodVisitor, int type, int stackCount, java.lang.Object[] stack, int changedLocalVariableCount, java.lang.Object[] changedLocalVariable, int fullLocalVariableCount, java.lang.Object[] fullLocalVariable)
Writes frames to aMethodVisitor
, if applicable.boolean
isActive()
Returnstrue
if frames should be generated.void
same(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_SAME
frame.void
same1(org.objectweb.asm.MethodVisitor methodVisitor, TypeDefinition stackValue, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_SAME1
frame.private static java.lang.Object
toStackMapFrame(TypeDefinition typeDefinition)
private static java.lang.Object[]
toStackMapFrames(java.util.List<? extends TypeDefinition> typeDefinitions)
static Implementation.Context.FrameGeneration
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Implementation.Context.FrameGeneration[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GENERATE
public static final Implementation.Context.FrameGeneration GENERATE
Indicates that frames should be generated.
-
EXPAND
public static final Implementation.Context.FrameGeneration EXPAND
Indicates that frames should be generated and expanded.
-
DISABLED
public static final Implementation.Context.FrameGeneration DISABLED
Indicates that no frames should be generated.
-
-
Method Detail
-
values
public static Implementation.Context.FrameGeneration[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Implementation.Context.FrameGeneration c : Implementation.Context.FrameGeneration.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Implementation.Context.FrameGeneration valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isActive
public boolean isActive()
Returnstrue
if frames should be generated.- Returns:
true
if frames should be generated.
-
same
public void same(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_SAME
frame.- Parameters:
methodVisitor
- The method visitor to write to.localVariables
- The local variables that are defined at this frame location.
-
same1
public void same1(org.objectweb.asm.MethodVisitor methodVisitor, TypeDefinition stackValue, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_SAME1
frame.- Parameters:
methodVisitor
- The method visitor to write to.stackValue
- The single stack value.localVariables
- The local variables that are defined at this frame location.
-
append
public void append(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> appended, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_APPEND
frame.- Parameters:
methodVisitor
- The method visitor to write to.appended
- The appended local variables.localVariables
- The local variables that are defined at this frame location, excluding the ones appended.
-
chop
public void chop(org.objectweb.asm.MethodVisitor methodVisitor, int chopped, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_CHOP
frame.- Parameters:
methodVisitor
- The method visitor to write to.chopped
- The number of chopped values.localVariables
- The local variables that are defined at this frame location, excluding the chopped variables.
-
full
public void full(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> stackValues, java.util.List<? extends TypeDefinition> localVariables)
Inserts aOpcodes.F_FULL
frame.- Parameters:
methodVisitor
- The method visitor to write to.stackValues
- The values on the operand stack.localVariables
- The local variables that are defined at this frame location.
-
generate
protected abstract void generate(org.objectweb.asm.MethodVisitor methodVisitor, int type, int stackCount, @MaybeNull java.lang.Object[] stack, int changedLocalVariableCount, @MaybeNull java.lang.Object[] changedLocalVariable, int fullLocalVariableCount, @MaybeNull java.lang.Object[] fullLocalVariable)
Writes frames to aMethodVisitor
, if applicable.- Parameters:
methodVisitor
- The method visitor to usetype
- The frame type.stackCount
- The number of values on the operand stack.stack
- The values on the operand stack up tostackCount
, ornull
, if none.changedLocalVariableCount
- The number of local variables that were changed.changedLocalVariable
- The values added to the local variable array up tochangedLocalVariableCount
ornull
, if none or not applicable.fullLocalVariableCount
- The number of local variables.fullLocalVariable
- The total number of local variables up tofullLocalVariableCount
ornull
, if none.
-
toStackMapFrames
private static java.lang.Object[] toStackMapFrames(java.util.List<? extends TypeDefinition> typeDefinitions)
-
toStackMapFrame
private static java.lang.Object toStackMapFrame(TypeDefinition typeDefinition)
-
-