// 
// Decompiled by Procyon v0.6.0
// 

package org.bson.codecs.pojo;

import org.bson.codecs.EncoderContext;
import org.bson.BsonWriter;
import org.bson.codecs.DecoderContext;
import org.bson.BsonReader;
import org.bson.codecs.configuration.CodecConfigurationException;
import org.bson.codecs.Codec;

class LazyMissingCodec<S> implements Codec<S>
{
    private final Class<S> clazz;
    private final CodecConfigurationException exception;
    
    LazyMissingCodec(final Class<S> clazz, final CodecConfigurationException exception) {
        this.clazz = clazz;
        this.exception = exception;
    }
    
    @Override
    public S decode(final BsonReader reader, final DecoderContext decoderContext) {
        throw this.exception;
    }
    
    @Override
    public void encode(final BsonWriter writer, final S value, final EncoderContext encoderContext) {
        throw this.exception;
    }
    
    @Override
    public Class<S> getEncoderClass() {
        return this.clazz;
    }
}
