Module aya.cli.impl

Class ReplConfig

java.lang.Object
org.aya.cli.interactive.ReplConfig
All Implemented Interfaces:
AutoCloseable

public class ReplConfig extends Object implements AutoCloseable
  • Field Details

    • configFile

      public final transient kala.control.Option<Path> configFile
    • prompt

      @NotNull public @NotNull String prompt
    • normalizeMode

      @NotNull public @NotNull org.aya.generic.util.NormalizeMode normalizeMode
    • prettierOptions

      @NotNull public @NotNull org.aya.prettier.AyaPrettierOptions prettierOptions
    • enableUnicode

      public boolean enableUnicode
    • silent

      public boolean silent
      Disables welcome message, echoing info, etc.
    • renderOptions

      public @UnknownNullability RenderOptions renderOptions
  • Constructor Details

    • ReplConfig

      public ReplConfig(@NotNull @NotNull kala.control.Option<Path> file)
  • Method Details

    • loadFromDefault

      @NotNull public static @NotNull ReplConfig loadFromDefault() throws IOException, com.google.gson.JsonParseException
      Throws:
      IOException
      com.google.gson.JsonParseException
    • loadFrom

      @NotNull public static @NotNull ReplConfig loadFrom(@NotNull @NotNull Path file) throws IOException, com.google.gson.JsonParseException
      Throws:
      IOException
      com.google.gson.JsonParseException
    • loadFrom

      @VisibleForTesting @NotNull public static @NotNull ReplConfig loadFrom(@NotNull @NotNull kala.control.Option<Path> file, @NotNull @NotNull String jsonText) throws com.google.gson.JsonParseException
      Throws:
      com.google.gson.JsonParseException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • newGsonBuilder

      @VisibleForTesting public static com.google.gson.GsonBuilder newGsonBuilder()