code: public static Class<?> getFieldValueType(Field field) {
      switch (field.getType()) {
        case TType.BOOL:
          return Boolean.class;
        case TType.BYTE:
          return Byte.class;
        case TType.DOUBLE:
          return Double.class;
        case TType.ENUM:
          return field.getEnumClass();
        case TType.I16:
          return Short.class;
        case TType.I32:
          return Integer.class;
        case TType.I64:
          return Long.class;
        case TType.LIST:
          return List.class;
        case TType.MAP:
          return Map.class;
        case TType.SET:
          return Set.class;
        case TType.STOP:
          return null;
        case TType.STRING:
          return String.class;
        case TType.STRUCT:
          return field.gettStructDescriptor().getThriftClass();
        case TType.VOID:
          return null;
      }
      return null;
    }
docs: Returns the value class of the given thrift field.
  
  @param field thrift field.
  @return class of field value, or null in the case of thrift types {@link TType#STOP} or
  {@link TType#VOID}.