类 GenericCollectionTypeResolver
- java.lang.Object
- org.springframework.core.GenericCollectionTypeResolver
@Deprecated public abstract class GenericCollectionTypeResolver extends Object
已过时。as of 4.3.6, in favor of directResolvableType
usageHelper class for determining element types of collections and maps.Mainly intended for usage within the framework, determining the target type of values to be added to a collection or map (to be able to attempt type conversion if appropriate).
- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller, Phillip Webb
- 另请参阅:
ResolvableType
构造器概要
构造器 构造器 说明 GenericCollectionTypeResolver()
已过时。
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static Class<?>
getCollectionFieldType(Field collectionField)
已过时。Determine the generic element type of the given Collection field.static Class<?>
getCollectionFieldType(Field collectionField, int nestingLevel)
已过时。Determine the generic element type of the given Collection field.static Class<?>
getCollectionFieldType(Field collectionField, int nestingLevel, Map<Integer,Integer> typeIndexesPerLevel)
已过时。as of 4.0, in favor of usingResolvableType
for arbitrary nesting levelsstatic Class<?>
getCollectionParameterType(MethodParameter methodParam)
已过时。Determine the generic element type of the given Collection parameter.static Class<?>
getCollectionReturnType(Method method)
已过时。Determine the generic element type of the given Collection return type.static Class<?>
getCollectionReturnType(Method method, int nestingLevel)
已过时。Determine the generic element type of the given Collection return type.static Class<?>
getCollectionType(Class<? extends Collection> collectionClass)
已过时。Determine the generic element type of the given Collection class (if it declares one through a generic superclass or generic interface).static Class<?>
getMapKeyFieldType(Field mapField)
已过时。Determine the generic key type of the given Map field.static Class<?>
getMapKeyFieldType(Field mapField, int nestingLevel)
已过时。Determine the generic key type of the given Map field.static Class<?>
getMapKeyFieldType(Field mapField, int nestingLevel, Map<Integer,Integer> typeIndexesPerLevel)
已过时。as of 4.0, in favor of usingResolvableType
for arbitrary nesting levelsstatic Class<?>
getMapKeyParameterType(MethodParameter methodParam)
已过时。Determine the generic key type of the given Map parameter.static Class<?>
getMapKeyReturnType(Method method)
已过时。Determine the generic key type of the given Map return type.static Class<?>
getMapKeyReturnType(Method method, int nestingLevel)
已过时。Determine the generic key type of the given Map return type.static Class<?>
getMapKeyType(Class<? extends Map> mapClass)
已过时。Determine the generic key type of the given Map class (if it declares one through a generic superclass or generic interface).static Class<?>
getMapValueFieldType(Field mapField)
已过时。Determine the generic value type of the given Map field.static Class<?>
getMapValueFieldType(Field mapField, int nestingLevel)
已过时。Determine the generic value type of the given Map field.static Class<?>
getMapValueFieldType(Field mapField, int nestingLevel, Map<Integer,Integer> typeIndexesPerLevel)
已过时。as of 4.0, in favor of usingResolvableType
for arbitrary nesting levelsstatic Class<?>
getMapValueParameterType(MethodParameter methodParam)
已过时。Determine the generic value type of the given Map parameter.static Class<?>
getMapValueReturnType(Method method)
已过时。Determine the generic value type of the given Map return type.static Class<?>
getMapValueReturnType(Method method, int nestingLevel)
已过时。Determine the generic value type of the given Map return type.static Class<?>
getMapValueType(Class<? extends Map> mapClass)
已过时。Determine the generic value type of the given Map class (if it declares one through a generic superclass or generic interface).
构造器详细资料
GenericCollectionTypeResolver
public GenericCollectionTypeResolver()
已过时。
方法详细资料
getCollectionType
public static Class<?> getCollectionType(Class<? extends Collection> collectionClass)
已过时。Determine the generic element type of the given Collection class (if it declares one through a generic superclass or generic interface).- 参数:
collectionClass
- the collection class to introspect- 返回:
- the generic type, or
null
if none
getMapKeyType
public static Class<?> getMapKeyType(Class<? extends Map> mapClass)
已过时。Determine the generic key type of the given Map class (if it declares one through a generic superclass or generic interface).- 参数:
mapClass
- the map class to introspect- 返回:
- the generic type, or
null
if none
getMapValueType
public static Class<?> getMapValueType(Class<? extends Map> mapClass)
已过时。Determine the generic value type of the given Map class (if it declares one through a generic superclass or generic interface).- 参数:
mapClass
- the map class to introspect- 返回:
- the generic type, or
null
if none
getCollectionFieldType
public static Class<?> getCollectionFieldType(Field collectionField)
已过时。Determine the generic element type of the given Collection field.- 参数:
collectionField
- the collection field to introspect- 返回:
- the generic type, or
null
if none
getCollectionFieldType
public static Class<?> getCollectionFieldType(Field collectionField, int nestingLevel)
已过时。Determine the generic element type of the given Collection field.- 参数:
collectionField
- the collection field to introspectnestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)- 返回:
- the generic type, or
null
if none
getCollectionFieldType
@Deprecated public static Class<?> getCollectionFieldType(Field collectionField, int nestingLevel, Map<Integer,Integer> typeIndexesPerLevel)
已过时。as of 4.0, in favor of usingResolvableType
for arbitrary nesting levelsDetermine the generic element type of the given Collection field.- 参数:
collectionField
- the collection field to introspectnestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)typeIndexesPerLevel
- Map keyed by nesting level, with each value expressing the type index for traversal at that level- 返回:
- the generic type, or
null
if none
getMapKeyFieldType
public static Class<?> getMapKeyFieldType(Field mapField)
已过时。Determine the generic key type of the given Map field.- 参数:
mapField
- the map field to introspect- 返回:
- the generic type, or
null
if none
getMapKeyFieldType
public static Class<?> getMapKeyFieldType(Field mapField, int nestingLevel)
已过时。Determine the generic key type of the given Map field.- 参数:
mapField
- the map field to introspectnestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)- 返回:
- the generic type, or
null
if none
getMapKeyFieldType
@Deprecated public static Class<?> getMapKeyFieldType(Field mapField, int nestingLevel, Map<Integer,Integer> typeIndexesPerLevel)
已过时。as of 4.0, in favor of usingResolvableType
for arbitrary nesting levelsDetermine the generic key type of the given Map field.- 参数:
mapField
- the map field to introspectnestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)typeIndexesPerLevel
- Map keyed by nesting level, with each value expressing the type index for traversal at that level- 返回:
- the generic type, or
null
if none
getMapValueFieldType
public static Class<?> getMapValueFieldType(Field mapField)
已过时。Determine the generic value type of the given Map field.- 参数:
mapField
- the map field to introspect- 返回:
- the generic type, or
null
if none
getMapValueFieldType
public static Class<?> getMapValueFieldType(Field mapField, int nestingLevel)
已过时。Determine the generic value type of the given Map field.- 参数:
mapField
- the map field to introspectnestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)- 返回:
- the generic type, or
null
if none
getMapValueFieldType
@Deprecated public static Class<?> getMapValueFieldType(Field mapField, int nestingLevel, Map<Integer,Integer> typeIndexesPerLevel)
已过时。as of 4.0, in favor of usingResolvableType
for arbitrary nesting levelsDetermine the generic value type of the given Map field.- 参数:
mapField
- the map field to introspectnestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)typeIndexesPerLevel
- Map keyed by nesting level, with each value expressing the type index for traversal at that level- 返回:
- the generic type, or
null
if none
getCollectionParameterType
public static Class<?> getCollectionParameterType(MethodParameter methodParam)
已过时。Determine the generic element type of the given Collection parameter.- 参数:
methodParam
- the method parameter specification- 返回:
- the generic type, or
null
if none
getMapKeyParameterType
public static Class<?> getMapKeyParameterType(MethodParameter methodParam)
已过时。Determine the generic key type of the given Map parameter.- 参数:
methodParam
- the method parameter specification- 返回:
- the generic type, or
null
if none
getMapValueParameterType
public static Class<?> getMapValueParameterType(MethodParameter methodParam)
已过时。Determine the generic value type of the given Map parameter.- 参数:
methodParam
- the method parameter specification- 返回:
- the generic type, or
null
if none
getCollectionReturnType
public static Class<?> getCollectionReturnType(Method method)
已过时。Determine the generic element type of the given Collection return type.- 参数:
method
- the method to check the return type for- 返回:
- the generic type, or
null
if none
getCollectionReturnType
public static Class<?> getCollectionReturnType(Method method, int nestingLevel)
已过时。Determine the generic element type of the given Collection return type.If the specified nesting level is higher than 1, the element type of a nested Collection/Map will be analyzed.
- 参数:
method
- the method to check the return type fornestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)- 返回:
- the generic type, or
null
if none
getMapKeyReturnType
public static Class<?> getMapKeyReturnType(Method method)
已过时。Determine the generic key type of the given Map return type.- 参数:
method
- the method to check the return type for- 返回:
- the generic type, or
null
if none
getMapKeyReturnType
public static Class<?> getMapKeyReturnType(Method method, int nestingLevel)
已过时。Determine the generic key type of the given Map return type.- 参数:
method
- the method to check the return type fornestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)- 返回:
- the generic type, or
null
if none
getMapValueReturnType
public static Class<?> getMapValueReturnType(Method method)
已过时。Determine the generic value type of the given Map return type.- 参数:
method
- the method to check the return type for- 返回:
- the generic type, or
null
if none
getMapValueReturnType
public static Class<?> getMapValueReturnType(Method method, int nestingLevel)
已过时。Determine the generic value type of the given Map return type.- 参数:
method
- the method to check the return type fornestingLevel
- the nesting level of the target type (typically 1; e.g. in case of a List of Lists, 1 would indicate the nested List, whereas 2 would indicate the element of the nested List)- 返回:
- the generic type, or
null
if none