From edfb49ff0f696829c9c4385e79dc9f206abb7952 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 23 Dec 2024 15:32:30 +0000 Subject: Hide fields of TomlTableWithSource --- .../compiler/config/toml/TomlTableWithSource.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/shedlang/compiler/config/toml/TomlTableWithSource.java b/src/main/java/org/shedlang/compiler/config/toml/TomlTableWithSource.java index d6ac3ba8..8d0c1db9 100644 --- a/src/main/java/org/shedlang/compiler/config/toml/TomlTableWithSource.java +++ b/src/main/java/org/shedlang/compiler/config/toml/TomlTableWithSource.java @@ -15,12 +15,19 @@ import java.util.Optional; import java.util.OptionalLong; import java.util.stream.IntStream; -public record TomlTableWithSource( - TomlTable table, - TomlPath path, - TomlPosition position, - Source fullSource -) { +public class TomlTableWithSource { + private final TomlTable table; + private final TomlPath path; + private final TomlPosition position; + private final Source fullSource; + + private TomlTableWithSource(TomlTable table, TomlPath path, TomlPosition position, Source fullSource) { + this.table = table; + this.path = path; + this.position = position; + this.fullSource = fullSource; + } + public static TomlTableWithSource parse(Source source) { var result = Toml.parse(source.contents()); -- cgit v1.2.3