Direct Known Subclasses:
CPDouble, CPFloat, CPInteger, CPLong

public abstract class CPConstantNumber extends CPConstant
Abstract superclass for constant pool entries that are numbers.
  • Constructor Details

    • CPConstantNumber

      public CPConstantNumber(byte tag, Object value, int globalIndex)
      Constructs a new instance.
      Parameters:
      tag - One-byte tag indicates the kind of constant.
      value - The value.
      globalIndex - Global index.
  • Method Details

    • getNumber

      protected Number getNumber()
      The value as a Number.
      Returns:
      The value as a Number.