Class ConfigSpec

java.lang.Object
fr.robie.machineengine.api.config.ConfigSpec

public final class ConfigSpec extends Object
Everything a config file holds: a header, comments of sections, and the keys in the order they are written. The file is generated from it: defaults and comments live here, not in a bundled YAML file.
  • Method Details

    • builder

      @NotNull public static @NotNull ConfigSpec.Builder builder()
    • header

      @NotNull public @NotNull List<String> header()
      Comment lines at the top of a new file.
    • sectionComment

      @NotNull public @NotNull List<String> sectionComment(@NotNull @NotNull String path)
      The comment above the section path, written when the section is added; empty if none.
    • keys

      @NotNull public @NotNull List<ConfigKey<?>> keys()
    • defaults

      @NotNull public @NotNull ConfigValues defaults()
      Every key at its default, e.g. for headless tests.