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 privateFrameGeneration(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 voidappend(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> appended, java.util.List<? extends TypeDefinition> localVariables)Inserts aOpcodes.F_APPENDframe.voidchop(org.objectweb.asm.MethodVisitor methodVisitor, int chopped, java.util.List<? extends TypeDefinition> localVariables)Inserts aOpcodes.F_CHOPframe.voidfull(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> stackValues, java.util.List<? extends TypeDefinition> localVariables)Inserts aOpcodes.F_FULLframe.protected abstract voidgenerate(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.booleanisActive()Returnstrueif frames should be generated.voidsame(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> localVariables)Inserts aOpcodes.F_SAMEframe.voidsame1(org.objectweb.asm.MethodVisitor methodVisitor, TypeDefinition stackValue, java.util.List<? extends TypeDefinition> localVariables)Inserts aOpcodes.F_SAME1frame.private static java.lang.ObjecttoStackMapFrame(TypeDefinition typeDefinition)private static java.lang.Object[]toStackMapFrames(java.util.List<? extends TypeDefinition> typeDefinitions)static Implementation.Context.FrameGenerationvalueOf(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()
Returnstrueif frames should be generated.- Returns:
trueif frames should be generated.
-
same
public void same(org.objectweb.asm.MethodVisitor methodVisitor, java.util.List<? extends TypeDefinition> localVariables)Inserts aOpcodes.F_SAMEframe.- 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_SAME1frame.- 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_APPENDframe.- 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_CHOPframe.- 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_FULLframe.- 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 tochangedLocalVariableCountornull, if none or not applicable.fullLocalVariableCount- The number of local variables.fullLocalVariable- The total number of local variables up tofullLocalVariableCountornull, if none.
-
toStackMapFrames
private static java.lang.Object[] toStackMapFrames(java.util.List<? extends TypeDefinition> typeDefinitions)
-
toStackMapFrame
private static java.lang.Object toStackMapFrame(TypeDefinition typeDefinition)
-
-