@Override
    public void accept(T model) {
        if (model instanceof HasCode) {
            @SuppressWarnings("unchecked")
            final HasCode<?> casted = (HasCode<?>) model;
            Formatting.alignTabs(casted.getCode());
        }
        
        if (model instanceof HasClasses) {
            @SuppressWarnings("unchecked")
            final HasClasses<?> casted = (HasClasses<?>) model;
            casted.getClasses().forEach(c -> c.call(new AlignTabs<>()));
        }
        
        if (model instanceof HasMethods) {
            @SuppressWarnings("unchecked")
            final HasMethods<?> casted = (HasMethods<?>) model;
            casted.getMethods().forEach(c -> c.call(new AlignTabs<>()));
        }
        
        if (model instanceof HasConstructors) {
            @SuppressWarnings("unchecked")
            final HasConstructors<?> casted = (HasConstructors<?>) model;
            casted.getConstructors().forEach(c -> c.call(new AlignTabs<>()));
        }
        
        if (model instanceof HasInitializers) {
            @SuppressWarnings("unchecked")
            final HasInitializers<?> casted = (HasInitializers<?>) model;
            casted.getInitializers().forEach(c -> c.call(new AlignTabs<>()));
        }
        
        if (model instanceof HasFields) {
            @SuppressWarnings("unchecked")
            final HasFields<?> casted = (HasFields<?>) model;
            
            alignTabs(casted.getFields(), field -> field.getValue()
                .filter(ReferenceValue.class::isInstance)
                .map(ReferenceValue.class::cast)
                .map(ReferenceValue::getValue)
                .orElse(null),
                    (field, value) -> ((ReferenceValue) field.getValue().orElseThrow(NoSuchElementException::new))
                    .setValue(value)
            );
        }
        
        if (model instanceof HasJavadoc) {
            @SuppressWarnings("unchecked")
            final HasJavadoc<?> casted = (HasJavadoc<?>) model;
            casted.getJavadoc().ifPresent(javadoc -> {
                final List<String> rows = Stream.of(javadoc.getText()
                    .split(Formatting.nl())
                ).collect(toList());
                
                Formatting.alignTabs(rows);
                
                javadoc.setText(rows.stream().collect(joining(Formatting.nl())));
            });
        }
    }
@param <T>  the type being operated upon

@author Emil Forslund
@since  2.4.3
common-parent/codegen/src/main/java/com/speedment/common/codegen/controller/AlignTabs.java