private void accept(File file, Class model) {
        requireNonNull(model);
        final Type self;

        if (model.getGenerics().isEmpty()) {
            self = SimpleType.create(model.getName());
        } else {
            self = SimpleParameterizedType.create(
                model.getName(),
                model.getGenerics().stream()
                    .map(Generic::asType)
                    .toArray(Type[]::new)
            );
        }

        model.getFields().forEach(f -> {
            f.private_();

            if (isCollection(f.getType())) {
                generateAdder(model, self, f);
            } else {
                generateSetter(model, self, f);
            }

            final Method get = Method.of("get" + ucfirst(f.getName()), f.getType())
                .set(Javadoc.of()
                    .setText("Gets the " + f.getName() + OF_THIS + shortName(model.getName()) + ".")
                    .add(JavadocTag.of(RETURN, "the " + f.getName()))
                ).public_()
                .add(RETURN + " " + THIS + "." + f.getName() + ";");

            if (onlyInclude.test(f, get)) {
                model.add(get);
            }
        });

        // Recurse into subclasses
        model.getClasses().stream()
            .filter(Class.class::isInstance)
            .map(Class.class::cast)
            .forEach(c -> accept(file, c));
    }
Generates getters, setters and adders for the fields in the specified
model and sets the fields to private. Method signatures that has been
excluded in the construction of this control will be excluded from the
generation.
<p>
For fields of a subtype to {@link Collection}, an 'adder' will be
generated instead of a 'setter'.
<p>
For fields of type {@link Optional}, the inner type will be used in the
setter parameter but the wrapped type will be used as output for the
getter.

@param file the model to generate for
common-parent/codegen/src/main/java/com/speedment/common/codegen/controller/SetGetAdd.java