public static CType valueOf(int value) {
        switch (value) {
          case 0: return STRING;
          case 1: return CORD;
          case 2: return STRING_PIECE;
          default: return null;
        }
      }