Package org.pkl.core.settings
Record Class PklSettings
java.lang.Object
java.lang.Record
org.pkl.core.settings.PklSettings
Java 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 static
load methods.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAn editor for viewing and editing Pkl files. -
Constructor Summary
ConstructorsConstructorDescriptionPklSettings(PklSettings.Editor editor, PklEvaluatorSettings.Http http) Creates an instance of aPklSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioneditor()Returns the value of theeditorrecord component.final booleanIndicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.final inthashCode()Returns a hash code value for this object.http()Returns the value of thehttprecord component.static PklSettingsload(ModuleSource moduleSource) Loads a settings file from the given path.static PklSettingsLoads the user settings file (~/.pkl/settings.pkl).final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PklSettings
Creates an instance of aPklSettingsrecord class.- Parameters:
editor- the value for theeditorrecord componenthttp- the value for thehttprecord component
-
-
Method Details
-
loadFromPklHomeDir
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
Loads a settings file from the given path.- Throws:
VmEvalException
-
getEditor
Deprecated, for removal: This API element is subject to removal in a future version.Returns the editor for viewing and editing Pkl files.This method is deprecated, use
editor()instead. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
editor
Returns the value of theeditorrecord component.- Returns:
- the value of the
editorrecord component
-
http
Returns the value of thehttprecord component.- Returns:
- the value of the
httprecord component
-