package p.studio.compiler.source.tables;

import p.studio.utilities.structures.ReadOnlyList;

import java.util.Objects;

public record ModuleReference(
        String project,
        ReadOnlyList<String> pathSegments) {
    public ModuleReference {
        project = Objects.requireNonNull(project, "project");
        if (project.isBlank()) {
            throw new IllegalArgumentException("project must not be blank");
        }
        pathSegments = pathSegments == null ? ReadOnlyList.empty() : pathSegments;
    }
}
