private <P extends Document, D extends Document> BiConsumer<T, Document> wrap(BiConsumer<T, D> consumer, BiFunction<P, Map<String, Object>, D> constructor) {
            return (t, doc) -> {
                @SuppressWarnings("unchecked") final P parent = (P) doc.getParent().orElse(null);
                consumer.accept(t, constructor.apply(parent, doc.getData()));
            };
        }
This method is executed after the file has been created but before it is
returned to the code generator.

@param file the file to operate on
generator-parent/generator-translator/src/main/java/com/speedment/generator/translator/AbstractJavaClassTranslator.java