class BoundBufferCodecFactory implements CodecFactory {

    public <T> Codec<T> create(AnnotatedElement metadata, Class<T> type,
                               ResolverContext context) {
        if (type.isArray() && BYTE_CLASS.equals(type)
                && metadata.isAnnotationPresent(BoundBuffer.class)) {
            return (Codec<T>) new BoundBufferCodec(metadata.getAnnotation(
                    BoundBuffer.class).match());
        } else {
            return null;
        }
    }

}