Package net.bytebuddy.implementation
Enum Class Implementation.Context.FrameGeneration
java.lang.Object
java.lang.Enum<Implementation.Context.FrameGeneration>
net.bytebuddy.implementation.Implementation.Context.FrameGeneration
- All Implemented Interfaces:
Serializable
,Comparable<Implementation.Context.FrameGeneration>
,Constable
- Enclosing interface:
Implementation.Context
public static enum Implementation.Context.FrameGeneration
extends Enum<Implementation.Context.FrameGeneration>
Indicates the frame generation being applied.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
FrameGeneration
(boolean active) Creates a new frame generation type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(org.objectweb.asm.MethodVisitor methodVisitor, List<? extends TypeDefinition> appended, List<? extends TypeDefinition> localVariables) Inserts aOpcodes.F_APPEND
frame.void
chop
(org.objectweb.asm.MethodVisitor methodVisitor, int chopped, List<? extends TypeDefinition> localVariables) Inserts aOpcodes.F_CHOP
frame.void
full
(org.objectweb.asm.MethodVisitor methodVisitor, List<? extends TypeDefinition> stackValues, List<? extends TypeDefinition> localVariables) Inserts aOpcodes.F_FULL
frame.protected abstract void
generate
(org.objectweb.asm.MethodVisitor methodVisitor, int type, int stackCount, Object[] stack, int changedLocalVariableCount, Object[] changedLocalVariable, int fullLocalVariableCount, Object[] fullLocalVariable) Writes frames to aMethodVisitor
, if applicable.boolean
isActive()
Returnstrue
if frames should be generated.void
same
(org.objectweb.asm.MethodVisitor methodVisitor, List<? extends TypeDefinition> localVariables) Inserts aOpcodes.F_SAME
frame.void
same1
(org.objectweb.asm.MethodVisitor methodVisitor, TypeDefinition stackValue, List<? extends TypeDefinition> localVariables) Inserts aOpcodes.F_SAME1
frame.private static Object
toStackMapFrame
(TypeDefinition typeDefinition) private static Object[]
toStackMapFrames
(List<? extends TypeDefinition> typeDefinitions) Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GENERATE
Indicates that frames should be generated. -
EXPAND
Indicates that frames should be generated and expanded. -
DISABLED
Indicates that no frames should be generated.
-
-
Field Details
-
EMPTY
An empty array to reuse for empty frames. -
active
private final boolean activetrue
if frames should be generated.
-
-
Constructor Details
-
FrameGeneration
private FrameGeneration(boolean active) Creates a new frame generation type.- Parameters:
active
-true
if frames should be generated.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- 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, 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, 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, List<? extends TypeDefinition> appended, 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, 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, List<? extends TypeDefinition> stackValues, 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 Object[] stack, int changedLocalVariableCount, @MaybeNull Object[] changedLocalVariable, int fullLocalVariableCount, @MaybeNull 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
-
toStackMapFrame
-