类 DefaultFormConvertor
java.lang.Object
com.dtflys.forest.converter.form.DefaultFormConvertor
- 所有已实现的接口:
ForestConverter<String>,ForestEncoder
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<T> TconvertToJavaObject(byte[] source, Class<T> targetType, Charset charset) 将源数据转换为目标类型(Class)的java对象<T> TconvertToJavaObject(byte[] source, Type targetType, Charset charset) 将源数据转换为目标类型(Type)的java对象<T> TconvertToJavaObject(String source, Type targetType) 将源数据转换为目标类型(Type)的java对象byte[]encodeRequestBody(ForestBody body, Charset charset, ConvertOptions options) encodeToString(Object obj) 获取当前数据转换器转换类型protected voidprocessFormArrayItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Object array, int target) 处理Form表单中的数组项protected voidprocessFormCollectionItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Collection collection, int target) 处理Form表单中的集合项protected voidprocessFormItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Object value, int target) 处理Form表单中的项protected voidprocessFormMapItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Map map, int target) 处理Form表单中的Map项protected List<RequestNameValue>processFromNameValueList(ForestRequest request, List<RequestNameValue> nameValueList, ForestConfiguration configuration, ConvertOptions options) 处理Form表单中的键值对列表从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.dtflys.forest.converter.ForestConverter
convertToJavaObject从接口继承的方法 com.dtflys.forest.converter.ForestEncoder
encodeRequestBody, encodeRequestBody, encodeRequestBody
-
构造器详细资料
-
DefaultFormConvertor
-
-
方法详细资料
-
convertToJavaObject
从接口复制的说明:ForestConverter将源数据转换为目标类型(Type)的java对象- 指定者:
convertToJavaObject在接口中ForestConverter<String>- 类型参数:
T- 目标类型泛型- 参数:
source- 源数据targetType- 目标类型 (Type对象)- 返回:
- 转换后的目标类型对象
-
convertToJavaObject
从接口复制的说明:ForestConverter将源数据转换为目标类型(Class)的java对象- 指定者:
convertToJavaObject在接口中ForestConverter<String>- 类型参数:
T- 目标类型泛型- 参数:
source- 源数据targetType- 目标类型 (Class对象)charset- 字符集- 返回:
- 转换后的目标类型对象
-
convertToJavaObject
从接口复制的说明:ForestConverter将源数据转换为目标类型(Type)的java对象- 指定者:
convertToJavaObject在接口中ForestConverter<String>- 类型参数:
T- 目标类型泛型- 参数:
source- 源数据targetType- 目标类型 (Type对象)charset- 字符集- 返回:
- 转换后的目标类型对象
-
getDataType
从接口复制的说明:ForestConverter获取当前数据转换器转换类型- 指定者:
getDataType在接口中ForestConverter<String>- 返回:
ForestDataType对象实例
-
encodeToString
- 指定者:
encodeToString在接口中ForestEncoder
-
processFormCollectionItem
protected void processFormCollectionItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Collection collection, int target) 处理Form表单中的集合项- 参数:
newNameValueList- 键值对列表configuration- Forest配置name- 表单项目名collection- 集合对象target- 请求目标位置
-
processFormArrayItem
protected void processFormArrayItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Object array, int target) 处理Form表单中的数组项- 参数:
newNameValueList- 键值对列表configuration- Forest配置name- 表单项目名array- 数组target- 请求目标位置
-
processFormMapItem
protected void processFormMapItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Map map, int target) 处理Form表单中的Map项- 参数:
newNameValueList- 键值对列表configuration- Forest配置name- 表单项目名map- Map对象target- 请求目标位置
-
processFormItem
protected void processFormItem(List<RequestNameValue> newNameValueList, ForestConfiguration configuration, String name, Object value, int target) 处理Form表单中的项- 参数:
newNameValueList- 键值对列表configuration- Forest配置name- 表单项目名value- 表单项目值target- 请求目标位置
-
processFromNameValueList
protected List<RequestNameValue> processFromNameValueList(ForestRequest request, List<RequestNameValue> nameValueList, ForestConfiguration configuration, ConvertOptions options) 处理Form表单中的键值对列表- 参数:
request- 请求对象nameValueList- 键值对列表configuration- Forest 配置对象options- 转换选项- 返回:
- 处理过的新键值对列表
-
encodeRequestBody
- 指定者:
encodeRequestBody在接口中ForestEncoder
-