Class OperandStack

java.lang.Object
xyz.janboerman.scalaloader.bytecode.OperandStack

public final class OperandStack extends Object
This class is NOT part of the public API!
  • Constructor Details

    • OperandStack

      public OperandStack()
  • Method Details

    • push

      public void push(org.objectweb.asm.Type type)
    • push

      public void push(org.objectweb.asm.Type... types)
    • replaceTop

      public org.objectweb.asm.Type replaceTop(org.objectweb.asm.Type type)
    • replaceTop

      public void replaceTop(int popAmount, org.objectweb.asm.Type type)
    • pop

      public org.objectweb.asm.Type pop()
    • pop

      public void pop(int amount)
    • stackSize

      public int stackSize()
      Get the size of the stack. This method takes "type categories" into account, so longs and doubles count as 2.
      Returns:
      the stack size
    • operandsSize

      public int operandsSize()
      Get the number of operands on the stack. This method does not take "type categories" into account, so every item counts as 1.
      Returns:
      the number of operands
    • maxStack

      public int maxStack()
      The largest size (as determined by stackSize()) that this stack has been in its lifetime.
      Returns:
      the maximum stack size
    • getOperands

      public List<org.objectweb.asm.Type> getOperands()
    • frame

      public Object[] frame()
    • toString

      public String toString()
      Overrides:
      toString in class Object