class MapCodecFactory implements CodecFactory {

    public <T> Codec<T> create(AnnotatedElement metadata, Class<T> type, ResolverContext context) {
        if (Map.class.isAssignableFrom(type)) {
            BoundList boundList = metadata.getAnnotation(BoundList.class);
            if (boundList != null && typeIsGuaranteedToBeEntry(boundList)) {
                Codec<List> listCodec =
                        codecFactory.create(metadata, List.class, context);
                if (listCodec != null) {
                    return new ListBasedMapCodec(listCodec);
                }  else {
                    return null;
                }
            }
        }
        return null;
    }

    public  MapCodecFactory(CodecFactory codecFactory);

}