类 SerializableTypeWrapper
java.lang.Object
cn.taketoday.core.SerializableTypeWrapper
Internal utility class that can be used to obtain wrapped
Serializable
variants of java.lang.reflect.Types.
Fields or MethodParameters can be used as the root source for a serializable type.
Alternatively, a regular Class can also be used as source.
The returned type will either be a Class or a serializable proxy of
GenericArrayType, ParameterizedType, TypeVariable or
WildcardType. With the exception of Class (which is final) calls
to methods that return further Types (for example
GenericArrayType.getGenericComponentType()) will be automatically wrapped.
- 从以下版本开始:
- 3.0
- 作者:
- Phillip Webb, Juergen Hoeller, Sam Brannen, Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static class(专用程序包) static classSerializableTypeWrapper.TypeProviderforTypesobtained by invoking a no-arg method.(专用程序包) static class(专用程序包) static class(专用程序包) static interfaceAdditional interface implemented by the type proxy.(专用程序包) static interfaceASerializableinterface providing access to aType.(专用程序包) static final record -
字段概要
字段修饰符和类型字段说明(专用程序包) static final ConcurrentReferenceHashMap<Type,Type> private static final Class<?>[] -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static TypeReturn aSerializablevariant ofField.getGenericType().static TypeforMethodParameter(MethodParameter methodParameter) Return aSerializablevariant ofMethodParameter.getGenericParameterType().(专用程序包) static Typestatic <T extends Type>
Tunwrap(T type) Unwrap the given type, effectively returning the original non-serializable type.
-
字段详细资料
-
SUPPORTED_SERIALIZABLE_TYPES
-
cache
-
-
构造器详细资料
-
SerializableTypeWrapper
private SerializableTypeWrapper()
-
-
方法详细资料
-
forField
Return aSerializablevariant ofField.getGenericType(). -
forMethodParameter
Return aSerializablevariant ofMethodParameter.getGenericParameterType(). -
unwrap
Unwrap the given type, effectively returning the original non-serializable type.- 参数:
type- the type to unwrap- 返回:
- the original non-serializable type
-
forTypeProvider
Return aSerializableTypebacked by aSerializableTypeWrapper.TypeProvider.If type artifacts are generally not serializable in the current runtime environment, this delegate will simply return the original
Typeas-is.
-