Profig

profig.Profig$
See theProfig companion class
object Profig extends Profig

Profig provides access to environment variables, properties, and other configuration all merged together into one powerful system. Uses JSON internally to provide merging and integration. Paths are dot-separated.

Attributes

Companion:
class
Graph
Supertypes
class Profig
class Object
trait Matchable
class Any
Self type
Profig.type

Members list

Concise view

Value members

Concrete methods

def init(loadProperties: Boolean, loadEnvironmentVariables: Boolean): Unit

Initializes Profig

Initializes Profig

Attributes

loadEnvironmentVariables

whether to load environment variables

loadProperties

whether to load system properties

def isLoaded: Boolean
def reset(): Unit

Inherited methods

def apply(): Json

Returns a Json representation of this path. Works similar to get(), except will return an empty Json object if there is nothing at this level.

Returns a Json representation of this path. Works similar to get(), except will return an empty Json object if there is nothing at this level.

Attributes

Returns:

Json

Inherited from:
ProfigPath
def apply(path: Path): ProfigPath

Attributes

Inherited from:
ProfigPath
def apply(path: String*): ProfigPath

Look up a deeper path below the current path.

Look up a deeper path below the current path.

Attributes

Returns:

ProfigPath

Inherited from:
ProfigPath
def as[T : Writer]: T

Loads this path out as the defined type T.

Loads this path out as the defined type T.

Attributes

T

the type to represent the current path

Returns:

T

Inherited from:
ProfigPath
def asOr[T : Writer](default: => T): T

Loads this path out as the defined type T. If no value is set for this path, the default will be used.

Loads this path out as the defined type T. If no value is set for this path, the default will be used.

Attributes

T

the type to represent the current path

default

the default to be used if this path is empty

Returns:

T

Inherited from:
ProfigPath
def clear(): Unit

Attributes

Inherited from:
Profig
def exists(): Boolean

True if this path exists in the config

True if this path exists in the config

Attributes

Inherited from:
ProfigPath
def get(): Option[Json]

Returns a Json representation of this path if there is anything defined at this level.

Returns a Json representation of this path if there is anything defined at this level.

Attributes

Returns:

Option[Json]

Inherited from:
ProfigPath
def initConfiguration(startPath: Path, additionalPaths: List[Path], recursiveParents: Boolean, includeClassPath: Boolean, fileNameMatcher: FileNameMatcher, errorHandler: Option[Throwable => Unit]): Unit

Attributes

Inherited from:
ProfigPathPlatform
override def instance: Profig

Attributes

Definition Classes
Inherited from:
Profig
def json: Json

Attributes

Inherited from:
Profig
def lastModified: Long

Attributes

Inherited from:
Profig
def load(fileName: String, source: Source, mergeType: MergeType, errorHandler: Option[Throwable => Unit]): Unit

Attributes

Inherited from:
ProfigPathPlatform
def loadConfiguration(startPath: Path, additionalPaths: List[Path], recursiveParents: Boolean, includeClassPath: Boolean, fileNameMatcher: FileNameMatcher, errorHandler: Option[Throwable => Unit]): Unit

Attributes

Inherited from:
ProfigPathPlatform
def loadEnvironmentVariables(`type`: MergeType): Unit

Attributes

Inherited from:
Profig
def loadFile(file: File, mergeType: MergeType, errorHandler: Option[Throwable => Unit]): Unit

Attributes

Inherited from:
ProfigPathPlatform
def loadProperties(`type`: MergeType): Unit

Attributes

Inherited from:
Profig
def map(keys: (String, String)*): Unit

Maps from an existing key (if found) to a new key within this path. This is sort of like aliasing from one key to a new key, but it will actually copy the values.

Maps from an existing key (if found) to a new key within this path. This is sort of like aliasing from one key to a new key, but it will actually copy the values.

Attributes

keys

(from, to)

Inherited from:
ProfigPath
def merge(json: Json, `type`: MergeType): Unit

Merges a Json object to this path.

Merges a Json object to this path.

Attributes

Inherited from:
ProfigPath
def opt[T : Writer]: Option[T]

Convenience functionality similar to as but returns an option if set.

Convenience functionality similar to as but returns an option if set.

Attributes

T

the type to represent the current path

Returns:

T

Inherited from:
ProfigPath
override def path: Path

Attributes

Definition Classes
Inherited from:
Profig
override def remove(): Unit

Removes this path

Removes this path

Attributes

Definition Classes
Inherited from:
Profig
def remove(field: String): Unit

Removes a field from this path.

Removes a field from this path.

Attributes

field

the field below this path to remove

Inherited from:
ProfigPath
def store[T : Reader](value: T): Unit

Stores the supplied value into this path.

Stores the supplied value into this path.

Attributes

T

the type of value

value

the value to store

Inherited from:
ProfigPath