code: public void writeConstant(Object obj) throws IOException {
          MethodRef m;
  
          if (obj instanceof ClassRef) {
              writeClassRef((ClassRef) obj);
          } else if (obj instanceof FieldRef) {
              writeFieldRef((FieldRef) obj);
          } else if (obj instanceof MethodRef) {
              m = (MethodRef) obj;
              if (m.ifc) {
                  writeInterfaceMethodRef(m);
              } else {
                  writeClassMethodRef(m);
              }
          } else if (obj instanceof String) {
              writeString((String) obj);
          } else if (obj instanceof Integer) {
              writeInt(((Integer) obj).intValue());
          } else if (obj instanceof Float) {
              writeFloat(((Float) obj).floatValue());
          } else if (obj instanceof Long) {
              writeLong(((Long) obj).longValue());
          } else if (obj instanceof Double) {
              writeDouble(((Double) obj).doubleValue());
          } else {
              throw new IllegalArgumentException("" + obj);
          }
      }
docs: --