ConfigMethods

final implicit class ConfigMethods(config: Config) extends AnyVal

Provides extension methods for com.typesafe.config.Config.

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def get[T](path: String)(using delegate: ConfigDelegate[T]): T

Gets T at path.

Gets T at path.

def getFile(path: String): File

Gets File at path.

Gets File at path.

Value parameters:
path

config path

def getFileList(path: String): List[File]

Gets java.util.List[File] at path.

Gets java.util.List[File] at path.

Value parameters:
path

config path

def getOption[T](path: String)(using delegate: ConfigDelegate[T]): Option[T]

Gets Option[T] at path.

Gets Option[T] at path.

Note:

delegate is invoked only if path exists.

def getOrElse[T](path: String, default: => T)(using delegate: ConfigDelegate[T]): T

Gets T at path or returns default.

Gets T at path or returns default.

Note:

delegate is invoked only if path exists.

def getTry[T](path: String)(using delegate: ConfigDelegate[T]): Try[T]

Gets Try[T] at path.

Gets Try[T] at path.

Returns:

Success[T] if path exists and its value is successfully converted; Failure otherwise