default String renderModifiers(Generator gen, M model, Modifier... allowed) {
        final Set<Modifier> modifiers;
        
        if (allowed.length == 0) {
            modifiers = model.getModifiers();
        } else {
            modifiers = Stream.of(allowed).collect(toSet());
            modifiers.retainAll(model.getModifiers());
        }
        final List<Modifier> sortedModifiers = modifiers.stream().sorted().collect(toList());
        return gen.onEach(sortedModifiers).collect(joinIfNotEmpty(" ", "", " "));
    }
Render the modifiers-part of the model with an extra space appended
afterwards. If no modifiers exists, an empty string is returned. If an
non-empty array of allowed modifiers is provided, only those can
be visible in the result.

@param gen      the generator
@param model    the model
@param allowed  set of modifiers that can be visible
@return         the generated code
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/trait/HasModifiersView.java