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.
  • Enum Constant Details

  • Field Details

    • EMPTY

      private static final Object[] EMPTY
      An empty array to reuse for empty frames.
    • active

      private final boolean active
      true 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

      public static Implementation.Context.FrameGeneration[] 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

      public static Implementation.Context.FrameGeneration valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isActive

      public boolean isActive()
      Returns true 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 a Opcodes.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 a Opcodes.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 a Opcodes.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 a Opcodes.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 a Opcodes.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 a MethodVisitor, if applicable.
      Parameters:
      methodVisitor - The method visitor to use
      type - The frame type.
      stackCount - The number of values on the operand stack.
      stack - The values on the operand stack up to stackCount, or null, if none.
      changedLocalVariableCount - The number of local variables that were changed.
      changedLocalVariable - The values added to the local variable array up to changedLocalVariableCount or null, if none or not applicable.
      fullLocalVariableCount - The number of local variables.
      fullLocalVariable - The total number of local variables up to fullLocalVariableCount or null, if none.
    • toStackMapFrames

      private static Object[] toStackMapFrames(List<? extends TypeDefinition> typeDefinitions)
    • toStackMapFrame

      private static Object toStackMapFrame(TypeDefinition typeDefinition)