类 StackSizeComputer

  • 所有已实现的接口:
    AttributeVisitor

    public class StackSizeComputer
    extends java.lang.Object
    implements AttributeVisitor
    This AttributeVisitor computes the stack sizes at all instruction offsets of the code attributes that it visits.

    If only the maximum stack size is required, then prefer MaxStackSizeComputer since this class uses more memory because it stores the sizes for each offset.

    • 构造器详细资料

      • StackSizeComputer

        public StackSizeComputer()
        Construct a StackSizeComputer that keeps track of sizes at each offset.
    • 方法详细资料

      • isReachable

        public boolean isReachable​(int instructionOffset)
        Returns whether the instruction at the given offset is reachable in the most recently visited code attribute.
      • getStackSizeBefore

        public int getStackSizeBefore​(int instructionOffset)
        Returns the stack size before the given instruction offset of the most recently visited code attribute.
      • getStackSizeAfter

        public int getStackSizeAfter​(int instructionOffset)
        Returns the stack size after the given instruction offset of the most recently visited code attribute.
      • getMaxStackSize

        public int getMaxStackSize()
        Returns the maximum stack size of the most recently visited code attribute.