class StructureImpl implements Structure {

    void addDeclaration(final StringBuilder builder, final int level) {
        for (final Field field : getFields()) {
            builder.append(StringUtils.repeat(" ", level * 2));
            builder.append(level).append(" ");
            builder.append(field.getDeclaration());
            builder.append("\n");

            if (field.getType().isComplexType()) {
                ((StructureImpl) field.getStructure()).addDeclaration(builder, level + 1);
            }
        }
    }

    public  StructureImpl(final Map<String, Field> fields);

}