de.bild.codec.CodecResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polymorphia Show documentation
Show all versions of polymorphia Show documentation
A very fast POJO codec for MongoDB (used in conjunction with the Mongo Java Driver) that handles generic types as well as polymorphic class hierarchies
package de.bild.codec;
import java.lang.reflect.Type;
/**
* This interface can be used to add special handling for pojos of certain types.
* Simply register a CodecResolver when you build the {@link PojoCodecProvider}
*/
public interface CodecResolver {
/**
*
* @param type the type to be handled
* @param typeCodecRegistry codec registry for any type
* @param codecConfiguration
* @return null, if resolver cannot handle type or a codec that is able to handle the type
*/
PolymorphicCodec getCodec(Type type, TypeCodecRegistry typeCodecRegistry, CodecConfiguration codecConfiguration);
}