public class TypeSerializerCollection extends Object
TypeSerializer
sModifier and Type | Method and Description |
---|---|
<T> TypeSerializer<T> |
get(TypeToken<T> type) |
TypeSerializerCollection |
newChild() |
<T> TypeSerializerCollection |
registerPredicate(Predicate<TypeToken<T>> type,
TypeSerializer<? super T> serializer)
Register a type serializer matching against a given predicate.
|
<T> TypeSerializerCollection |
registerType(TypeToken<T> type,
TypeSerializer<? super T> serializer)
Register a type serializer for a given type.
|
public <T> TypeSerializer<T> get(TypeToken<T> type)
public <T> TypeSerializerCollection registerType(TypeToken<T> type, TypeSerializer<? super T> serializer)
T
- The type to generify aroundtype
- The type to acceptserializer
- The serializer that will be serialized withpublic <T> TypeSerializerCollection registerPredicate(Predicate<TypeToken<T>> type, TypeSerializer<? super T> serializer)
T
- The type parametertype
- The predicate to match types againstserializer
- The serializer to serialize matching types withpublic TypeSerializerCollection newChild()
Copyright © 2014–2017. All rights reserved.