// Path: src/main/java/de/skuzzle/enforcer/restrictimports/util/StringRepresentation.java
// public final class StringRepresentation {
// 
//     private final String name;
//     private final List<Attribute> attributes = new ArrayList<>();
// 
//     private StringRepresentation(String name) {
//         this.name = name;
//     }
// 
//     public static StringRepresentation ofType(Class<?> type) {
//         return new StringRepresentation(type.getSimpleName());
//     }
// 
//     public static StringRepresentation ofInstance(Object instance) {
//         return ofType(instance.getClass());
//     }
// 
//     public StringRepresentation add(String attribute, Object value) {
//         attributes.add(new Attribute(attribute, value));
//         return this;
//     }
// 
//     @Override
//     public String toString() {
//         return new StringBuilder(name)
//                 .append("{")
//                 .append(attributes.stream().map(Attribute::toString).collect(Collectors.joining(", ")))
//                 .append("}")
//                 .toString();
//     }
// 
//     private static final class Attribute {
//         private final String name;
//         private final Object value;
// 
//         private Attribute(String name, Object value) {
//             this.name = name;
//             this.value = value;
//         }
// 
//         @Override
//         public String toString() {
//             return name + "=" + value;
//         }
//     }
// }


import java.nio.file.Path;
import java.util.Collection;
import java.util.Objects;
import de.skuzzle.enforcer.restrictimports.util.StringRepresentation;
package de.skuzzle.enforcer.restrictimports.parser;



/**
 * Represents a source file that has been parsed for import statements.
 */
public final class ParsedFile {

    private final Path path;
    private final String declaredPackage;
    private final String fqcn;
    private final Collection<ImportStatement> imports;

    public ParsedFile(Path path, String declaredPackage, String fqcn, Collection<ImportStatement> imports) {
        this.path = path;
        this.declaredPackage = declaredPackage;
        this.fqcn = fqcn;
        this.imports = imports;
    }

    public Path getPath() {
        return path;
    }

// Path: src/main/java/de/skuzzle/enforcer/restrictimports/util/StringRepresentation.java
// public final class StringRepresentation {
// 
//     private final String name;
//     private final List<Attribute> attributes = new ArrayList<>();
// 
//     private StringRepresentation(String name) {
//         this.name = name;
//     }
// 
//     public static StringRepresentation ofType(Class<?> type) {
//         return new StringRepresentation(type.getSimpleName());
//     }
// 
//     public static StringRepresentation ofInstance(Object instance) {
//         return ofType(instance.getClass());
//     }
// 
//     public StringRepresentation add(String attribute, Object value) {
//         attributes.add(new Attribute(attribute, value));
//         return this;
//     }
// 
//     @Override
//     public String toString() {
//         return new StringBuilder(name)
//                 .append("{")
//                 .append(attributes.stream().map(Attribute::toString).collect(Collectors.joining(", ")))
//                 .append("}")
//                 .toString();
//     }
// 
//     private static final class Attribute {
//         private final String name;
//         private final Object value;
// 
//         private Attribute(String name, Object value) {
//             this.name = name;
//             this.value = value;
//         }
// 
//         @Override
//         public String toString() {
//             return name + "=" + value;
//         }
//     }
// }


// Path: src/main/java/de/skuzzle/enforcer/restrictimports/parser/ParsedFile.java
import java.nio.file.Path;
import java.util.Collection;
import java.util.Objects;
import de.skuzzle.enforcer.restrictimports.util.StringRepresentation;

package de.skuzzle.enforcer.restrictimports.parser;



/**
 * Represents a source file that has been parsed for import statements.
 */
public final class ParsedFile {

    private final Path path;
    private final String declaredPackage;
    private final String fqcn;
    private final Collection<ImportStatement> imports;

    public ParsedFile(Path path, String declaredPackage, String fqcn, Collection<ImportStatement> imports) {
        this.path = path;
        this.declaredPackage = declaredPackage;
        this.fqcn = fqcn;
        this.imports = imports;
    }

    public Path getPath() {
        return path;
    }

    public Collection<ImportStatement> getImports() {