Package io.servicetalk.serialization.api
Class TypeHolder<T>
java.lang.Object
io.servicetalk.serialization.api.TypeHolder<T>
- Type Parameters:
T- Type to be inferred.
Deprecated.
An abstract class to infer
ParameterizedTypes for a child class.
This type can be retrieved from type().
In order to use this, one has to create an anonymous sub-class, like:
TypeHolder<Set<String>> holder = new TypeHolder<Set<String>>() { };
This implementation is based on the samples provided in
this article..-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Typetype()Deprecated.Returns the inferred generic type for thisTypeHolder.
-
Constructor Details
-
TypeHolder
protected TypeHolder()Deprecated.Creates a new instance.
-
-
Method Details
-
type
Deprecated.Returns the inferred generic type for thisTypeHolder.- Returns:
- Inferred generic type for this
TypeHolder.
-
Typeserialization is not supported by all serializers. Defer to your specificSerializerimplementation. For example jackson offers TypeReference which can be used directly.