@Override
    @SuppressWarnings("unchecked")
    public <A, B> Stream<Meta<A, B>> metaOn(A from, Class<B> to) {
        requireNonNulls(from, to);
        
        if (from instanceof Optional) {
            throw new UnsupportedOperationException(
                "Model must not be an Optional!"
            );
        }

        return BridgeTransform.create(factory, from.getClass(), to)
            .map(t -> (Transform<A, B>) t)
            .map(t -> transform(t, from, factory))
            .filter(Optional::isPresent)
            .map(Optional::get)
        ;
    }
Creates a new generator.

@param mgr      the dependency manager to use
@param factory  the factory to use
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/GeneratorImpl.java