code: public static final Class<?> getFieldClass(final FieldDescriptor field,
        final boolean isRepeatedAsList) {
      if (isRepeatedAsList && field.isRepeated()) {
        // return IRepeatedFieldValueBuilder.class;
        return List.class;
      }
  
      switch (field.getJavaType()) {
        case BOOLEAN:
          return Boolean.class;
        case DOUBLE:
          return Double.class;
        case FLOAT:
          return Float.class;
        case INT:
          return Integer.class;
        case LONG:
          return Long.class;
        case STRING:
          return String.class;
        case BYTE_STRING:
          return String.class;
        case ENUM:
          // return String.getClass();
          // return field.getEnumType().getClass();
          return Object.class;
        case MESSAGE:
          // return field.getMessageType().getClass();
          return MessageOrBuilder.class;
        default:
          return null;
      }
    }
docs: **** Factory methods