code: Item newConstItem(final Object cst) {
          if (cst instanceof Integer) {
              int val = ((Integer) cst).intValue();
              return newInteger(val);
          } else if (cst instanceof Byte) {
              int val = ((Byte) cst).intValue();
              return newInteger(val);
          } else if (cst instanceof Character) {
              int val = ((Character) cst).charValue();
              return newInteger(val);
          } else if (cst instanceof Short) {
              int val = ((Short) cst).intValue();
              return newInteger(val);
          } else if (cst instanceof Boolean) {
              int val = ((Boolean) cst).booleanValue() ? 1 : 0;
              return newInteger(val);
          } else if (cst instanceof Float) {
              float val = ((Float) cst).floatValue();
              return newFloat(val);
          } else if (cst instanceof Long) {
              long val = ((Long) cst).longValue();
              return newLong(val);
          } else if (cst instanceof Double) {
              double val = ((Double) cst).doubleValue();
              return newDouble(val);
          } else if (cst instanceof String) {
              return newString((String) cst);
          } else if (cst instanceof Type) {
              Type t = (Type) cst;
              return newClassItem(t.getSort() == Type.OBJECT
                      ? t.getInternalName()
                      : t.getDescriptor());
          } else {
              throw new IllegalArgumentException("value " + cst);
          }
      }
docs: Adds a number or string constant to the constant pool of the class being
  build. Does nothing if the constant pool already contains a similar item.
  
  @param cst the value of the constant to be added to the constant pool.
  This parameter must be an {@link Integer}, a {@link Float}, a
  {@link Long}, a {@link Double}, a {@link String} or a
  {@link Type}.
  @return a new or already existing constant item with the given value.