se.l4.commons.serialization.spi.StaticSerializerResolver Maven / Gradle / Ivy
The newest version!
package se.l4.commons.serialization.spi;
import se.l4.commons.serialization.Serializer;
/**
* Resolver for types that have only one serializer.
*
* @author Andreas Holstenson
*
* @param
*/
public class StaticSerializerResolver
extends AbstractSerializerResolver
{
private final Serializer serializer;
public StaticSerializerResolver(Serializer serializer)
{
this.serializer = serializer;
}
@Override
public Serializer find(TypeEncounter encounter)
{
return serializer;
}
}