Package org.pkl.core.settings
Class PklSettings
- java.lang.Object
-
- org.pkl.core.settings.PklSettings
-
public final class PklSettings extends java.lang.ObjectJava representation of a Pkl settings file. A Pkl settings file is a Pkl module amending the pkl.settings standard library module. To load a settings file, use one of the staticloadmethods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPklSettings.EditorAn editor for viewing and editing Pkl files.
-
Constructor Summary
Constructors Constructor Description PklSettings(PklSettings.Editor editor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable java.lang.Object o)PklSettings.EditorgetEditor()Returns the editor for viewing and editing Pkl files.inthashCode()static PklSettingsload(ModuleSource moduleSource)Loads a settings file from the given path.static PklSettingsloadFromPklHomeDir()Loads the user settings file (~/.pkl/settings.pkl).java.lang.StringtoString()
-
-
-
Constructor Detail
-
PklSettings
public PklSettings(PklSettings.Editor editor)
-
-
Method Detail
-
loadFromPklHomeDir
public static PklSettings loadFromPklHomeDir() throws VmEvalException
Loads the user settings file (~/.pkl/settings.pkl). If this file does not exist, returns default settings defined by module pkl.settings.- Throws:
VmEvalException
-
load
public static PklSettings load(ModuleSource moduleSource) throws VmEvalException
Loads a settings file from the given path.- Throws:
VmEvalException
-
getEditor
public PklSettings.Editor getEditor()
Returns the editor for viewing and editing Pkl files.
-
equals
public boolean equals(@Nullable java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-