public class ServiceLoaderTypeResolver extends Object implements SerializableTypeResolver
ServiceLoader.
This type resolver resolves serializable types and serializers via ServiceLoader. It searches the
classpath for serializable types and serializers registered as implementations of CatalystSerializable,
TypeSerializer, or TypeSerializerFactory. Serializables can be annotated
with the SerializeWith annotation to identify serializable type IDs and serializers, and
serializers and factories can be annotated with the Serialize annotation to identify
serializable types and IDs.
All classes that are loadable as services must provide a default no-argument constructor.
| Constructor and Description |
|---|
ServiceLoaderTypeResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
resolve(SerializerRegistry registry)
Registers serializable types on the given
SerializerRegistry instance. |
public void resolve(SerializerRegistry registry)
SerializableTypeResolverSerializerRegistry instance.resolve in interface SerializableTypeResolverregistry - The serializer registry.Copyright © 2013–2015. All rights reserved.