public abstract class AbstractIoRegistry extends Object implements IoRegistry
IoRegistry
interface that provides implementation of the methods using a
a HashMap
. Providers should extend from this class if they have custom serializers to provide to IO
instances. Simply register their classes to it via the provided register(Class, Class, Object)
method.
It is important that implementations provide a zero-arg constructor as there may be cases where it will need to be
constructed via reflection. As such, calls to register(Class, Class, Object)
should likely occur
directly in the constructor.IO_REGISTRY
Constructor and Description |
---|
AbstractIoRegistry() |
Modifier and Type | Method and Description |
---|---|
List<<any>> |
find(Class<? extends Io> builderClass)
|
<S> List<<any>> |
find(Class<? extends Io> builderClass,
Class<S> serializerType)
|
protected void |
register(Class<? extends Io> ioClass,
Class clazz,
Object serializer)
Add a "serializer" for the
Mapper . |
protected void register(Class<? extends Io> ioClass, Class clazz, Object serializer)
Mapper
. Note that what is accepted as a "serializer" is implementation
specific. An Io
implementation will consult this registry for "serializer" classes
it expects so refer to the Io
implementation to understand what is expected for these values.clazz
- usually this is the class that is to be serialized - may be null
serializer
- a serializer implementationpublic List<<any>> find(Class<? extends Io> builderClass)
find
in interface IoRegistry
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.