private static <A, B, T extends Transform<A, B>> Stream<T> create(TransformFactory factory, BridgeTransform<A, B> bridge) {
        requireNonNull(factory);
        requireNonNull(bridge);
        
        if (bridge.end.equals(bridge.to)) {
            @SuppressWarnings("unchecked")
            final T result = (T) bridge;
            return Stream.of(result);
        } else {
            final List<Stream<T>> bridges = new ArrayList<>();
            
            factory.allFrom(bridge.end).stream().forEachOrdered(e -> {
                
                final BridgeTransform<A, B> br = new BridgeTransform<>(bridge);
                
                @SuppressWarnings("unchecked")
                Class<Object> a = (Class<Object>) bridge.end;
                
                @SuppressWarnings("unchecked")
                Class<Object> b = (Class<Object>) e.getKey();
                
                @SuppressWarnings("unchecked")
                Transform<Object, Object> transform = (Transform<Object, Object>) e.getValue();
                
                if (br.addStep(a, b, transform)) {
                    bridges.add(create(factory, br));
                }
            });
            
            return bridges.stream().flatMap(i -> i);
        }
    }
Takes a bridge and completes it if it is not finished. Returns all valid 
paths through the graph as a <code>Stream</code>.

@param <A>     the initial type of a model to transform
@param <B>     the final type of a model after transformation
@param <T>     the type of a transform between A and B
@param factory a factory with all intermediate steps installed
@param bridge  the incomplete bridge to finish
@return        a <code>Stream</code> of all unique paths between A and B
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/BridgeTransform.java