Class Instruction

  • All Implemented Interfaces:
    Constants, RuntimeConstants
    Direct Known Subclasses:
    Label

    public class Instruction
    extends java.lang.Object
    implements Constants
    An Java instruction WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
    • Field Detail

      • where

        long where
      • pc

        int pc
      • opc

        int opc
      • value

        java.lang.Object value
      • flagCondInverted

        boolean flagCondInverted
      • flagNoCovered

        boolean flagNoCovered
      • SWITCHRATIO

        public static final double SWITCHRATIO
        When deciding between a lookupswitch and a tableswitch, this value is used in determining how much size increase is acceptable.
    • Constructor Detail

      • Instruction

        public Instruction​(long where,
                           int opc,
                           java.lang.Object value,
                           boolean flagCondInverted)
        Constructor
      • Instruction

        public Instruction​(boolean flagNoCovered,
                           long where,
                           int opc,
                           java.lang.Object value)
        Constructor
      • Instruction

        public Instruction​(long where,
                           int opc,
                           boolean flagNoCovered)
        Constructor
      • Instruction

        public Instruction​(long where,
                           int opc,
                           java.lang.Object value)
        Constructor
    • Method Detail

      • getOpcode

        public int getOpcode()
        Accessor
      • getValue

        public java.lang.Object getValue()
      • setValue

        public void setValue​(java.lang.Object value)
      • optimize

        void optimize​(Environment env)
        Optimize
      • collect

        void collect​(ConstantPool tab)
        Collect constants into the constant table
      • balance

        int balance()
        Balance the stack
      • size

        int size​(ConstantPool tab)
        Return the size of the instruction
      • write

        void write​(java.io.DataOutputStream out,
                   ConstantPool tab)
            throws java.io.IOException
        Generate code
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        toString
        Overrides:
        toString in class java.lang.Object