public interface ReferenceCodecProvider
Modifier and Type | Method and Description |
---|---|
<T extends Codec> |
getCodec(Class<T> codecClass)
Get codec instance by its class.
|
<T extends Codec,K extends RObject> |
getCodec(Class<T> codecClass,
Class<K> rObjectClass)
Get a codec instance by its class, the implementation class of the RObject
interface.
|
<T extends Codec,K extends RObject> |
getCodec(Class<T> codecClass,
Class<K> rObjectClass,
String name)
Get a codec instance by its class, the implementation class of the RObject
interface and the name of RObject (the value returned by RObject.getName()
method).
|
<T extends Codec> |
getCodec(Class<T> codecClass,
RObject rObject)
Get a codec instance by its class and an instance of the RObject.
|
<T extends Codec> |
getCodec(REntity anno,
Class<?> cls)
Get a codec instance by a REntity annotation and the class annotated with
it.
|
<T extends Codec,K extends RObject> |
getCodec(RObjectField anno,
Class<?> cls,
Class<K> rObjectClass,
String fieldName)
Get a codec instance by a RObjectField annotation and the class annotated
with REntity, the implementation class of RObject the field is going to
be transformed into and the name of the field with this RObjectField
annotation.
|
<T extends Codec,K extends RObject> |
registerCodec(Class<T> codecClass,
Class<K> rObjectClass,
String name,
T codec)
Register a codec by its class or super class, the class of the RObject
implementation and the name of RObject (the value returned by
RObjectField.getName() method).
|
<T extends Codec,K extends RObject> |
registerCodec(Class<T> codecClass,
Class<K> rObjectClass,
T codec)
Register a codec by its class or super class and the class of the RObject
implementation.
|
<T extends Codec> |
registerCodec(Class<T> codecClass,
RObject rObject,
T codec)
Register a codec by its class or super class and an instance of the
RObject.
|
<T extends Codec> |
registerCodec(Class<T> codecClass,
T codec)
Register a codec by its class or super class.
|
<T extends Codec> |
registerCodec(REntity anno,
Class<?> cls,
T codec)
Register a codec by the REntity annotation and the class annotated with
it.
|
<T extends Codec,K extends RObject> |
registerCodec(RObjectField anno,
Class<?> cls,
Class<K> rObjectClass,
String fieldName,
T codec)
Register a codec by the RObjectField annotation, the class annotated with
REntity, the implementation class of RObject the field is going to
be transformed into and the name of the field with this RObjectField
annotation.
|
<T extends Codec> T getCodec(Class<T> codecClass)
T
- the expected codec type.codecClass
- the codec class used to lookup the codec.<T extends Codec> T getCodec(REntity anno, Class<?> cls)
T
- the expected codec type.anno
- REntity annotation used on the class.cls
- The class that has the REntity annotation.<T extends Codec,K extends RObject> T getCodec(RObjectField anno, Class<?> cls, Class<K> rObjectClass, String fieldName)
T
- the expected codec type.K
- the type of the RObject.anno
- RObjectField annotation used on the field.cls
- The class that has the REntity annotation.rObjectClass
- the implementation class of RObject the field is going
to be transformed into.fieldName
- the name of the field with this RObjectField annotation.<T extends Codec,K extends RObject> T getCodec(Class<T> codecClass, Class<K> rObjectClass)
T
- the expected codec type.K
- the RObject type.codecClass
- the codec class used to lookup the codec.rObjectClass
- the class of the RObject implementation.<T extends Codec,K extends RObject> T getCodec(Class<T> codecClass, Class<K> rObjectClass, String name)
T
- the expected codec type.K
- the RObject type.codecClass
- the codec class used to lookup the codec.rObjectClass
- the class of the RObject implementation.name
- the name of RObject.<T extends Codec> T getCodec(Class<T> codecClass, RObject rObject)
T
- the expected codec type.codecClass
- the codec class used to lookup the codec.rObject
- instance of the RObject implementation.<T extends Codec> void registerCodec(Class<T> codecClass, T codec)
T
- the codec type to register.codecClass
- the codec Class to register it can be a super class of
the instance.codec
- the codec instance.<T extends Codec> void registerCodec(REntity anno, Class<?> cls, T codec)
T
- the codec type to register.anno
- REntity annotation used on the class.cls
- The class that has the REntity annotation.codec
- the codec instance.<T extends Codec,K extends RObject> void registerCodec(RObjectField anno, Class<?> cls, Class<K> rObjectClass, String fieldName, T codec)
T
- the codec type to register.K
- the type of the RObject.anno
- RObjectField annotation used on the field.cls
- The class that has the REntity annotation.rObjectClass
- the implementation class of RObject the field is going
to be transformed into.fieldName
- the name of the field with this RObjectField annotation.codec
- the codec instance.<T extends Codec,K extends RObject> void registerCodec(Class<T> codecClass, Class<K> rObjectClass, T codec)
T
- the codec type to register.K
- the RObjectField type.codecClass
- the codec Class to register it can be a super class of
the instance.rObjectClass
- the class of the RObject implementation.codec
- the codec instance.<T extends Codec,K extends RObject> void registerCodec(Class<T> codecClass, Class<K> rObjectClass, String name, T codec)
T
- the codec type to register.K
- the RObjectField type.codecClass
- the codec Class to register it can be a super class of
the instance.rObjectClass
- the class of the RObject implementation.name
- the name of RObject.codec
- the codec instance.<T extends Codec> void registerCodec(Class<T> codecClass, RObject rObject, T codec)
T
- the codec type to register.codecClass
- the codec Class to register it can be a super class of
the instance.rObject
- instance of the RObject implementation.codec
- the codec instance.Copyright © 2014–2018 The Redisson Project. All rights reserved.