Class NumberConstantData

  • All Implemented Interfaces:
    RuntimeConstants

    final class NumberConstantData
    extends ConstantPoolData
    A numeric constant pool item. Can either be integer, float, long or double. 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

      • num

        java.lang.Number num
    • Constructor Detail

      • NumberConstantData

        NumberConstantData​(ConstantPool tab,
                           java.lang.Number num)
        Constructor
    • Method Detail

      • write

        void write​(Environment env,
                   java.io.DataOutputStream out,
                   ConstantPool tab)
            throws java.io.IOException
        Write the constant to the output stream
        Specified by:
        write in class ConstantPoolData
        Throws:
        java.io.IOException
      • width

        int width()
        Return the number of entries that it takes up in the constant pool
        Overrides:
        width in class ConstantPoolData