@Override
    public Optional<String> transform(Generator gen, Import model) {
        requireNonNulls(gen, model);
        final String name = stripGenerics(model.getType().getTypeName())
            .replace('$', '.');

        if (!model.getModifiers().isEmpty()
        ||   shouldImport(gen, model.getType())) {
            return Optional.of(
                "import "
                + gen.onEach(model.getModifiers()).collect(joinIfNotEmpty(" ", "", " "))
                + name
                + model.getStaticMember().map(str -> "." + str).orElse("")
                + ";"
            ).filter(x -> {
                gen.getDependencyMgr().load(name);
                return true;
            });
        } else {
            return Optional.empty();
        }
    }
Transforms from an {@link Import} to java code.

@author Emil Forslund
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/ImportView.java