public interface SerializerCollection
Serializers and resolvers.| Modifier and Type | Method and Description |
|---|---|
SerializerCollection |
bind(Class<?> type)
Bind a certain type automatically discovering which serializer to
use.
|
<T> SerializerCollection |
bind(Class<T> type,
Serializer<T> serializer)
Bind a given type to the specified serializer.
|
<T> SerializerCollection |
bind(Class<T> type,
SerializerResolver<? extends T> resolver)
Bind a given type to the specified resolver.
|
<T> Serializer<T> |
find(Class<T> type)
Find a serializer suitable for the specific type.
|
<T> Serializer<T> |
find(Class<T> type,
Annotation... hints)
Find a serializer suitable for the specific type.
|
Serializer<?> |
find(String name)
Find a serializer based on its registered name.
|
Serializer<?> |
find(String namespace,
String name)
Find a serializer based on its registered name.
|
Serializer<?> |
find(Type type)
Find a serializer suitable for the specified type.
|
Serializer<?> |
find(Type type,
Annotation... hints)
Find a serializer suitable for the specified type.
|
QualifiedName |
findName(Serializer<?> serializer)
Find the name of the given serializer (if any).
|
<T> Serializer<T> |
findVia(Class<? extends SerializerOrResolver<T>> resolver,
Class<T> type,
Annotation... hints)
Find a serializer using a specific
SerializerResolver. |
<T> Serializer<T> |
findVia(Class<? extends SerializerOrResolver<T>> resolver,
Type type,
Annotation... hints)
Find a serializer using a specific
SerializerResolver. |
InstanceFactory |
getInstanceFactory()
Get the current instance factory.
|
SerializerResolver<?> |
getResolver(Class<?> type)
Get the resolver this collection would use to resolve a serializer
for the given type.
|
boolean |
isSupported(Class<?> type)
Get if the given type can be serialized.
|
InstanceFactory getInstanceFactory()
SerializerCollection bind(Class<?> type)
type - <T> SerializerCollection bind(Class<T> type, Serializer<T> serializer)
T - type - serializer - <T> SerializerCollection bind(Class<T> type, SerializerResolver<? extends T> resolver)
T - type - resolver - <T> Serializer<T> find(Class<T> type)
T - type - <T> Serializer<T> find(Class<T> type, Annotation... hints)
T - type - Serializer<?> find(Type type)
type - Serializer<?> find(Type type, Annotation... hints)
type - Serializer<?> find(String name)
name - Serializer<?> find(String namespace, String name)
namespace - name - <T> Serializer<T> findVia(Class<? extends SerializerOrResolver<T>> resolver, Class<T> type, Annotation... hints)
SerializerResolver.sOrR - type - <T> Serializer<T> findVia(Class<? extends SerializerOrResolver<T>> resolver, Type type, Annotation... hints)
SerializerResolver.sOrR - type - SerializerResolver<?> getResolver(Class<?> type)
type - boolean isSupported(Class<?> type)
type - QualifiedName findName(Serializer<?> serializer)
serializer - Copyright © 2016. All rights reserved.