trait RichConfigOps extends LowPriorityArgs4cImplicits
Provider operations on a 'config'
- Alphabetic
- By Inheritance
- RichConfigOps
- LowPriorityArgs4cImplicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
implicit
class
RichArgs extends AnyRef
- Definition Classes
- LowPriorityArgs4cImplicits
-
implicit
class
RichString extends AnyRef
- Definition Classes
- LowPriorityArgs4cImplicits
Abstract Value Members
- abstract def config: Config
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
asDuration(key: String): Duration
- key
the configuration path
- returns
the value at the given key as a scala duration
- def asFiniteDuration(key: String): FiniteDuration
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJson: String
- returns
the configuration as a json string
-
def
asList(path: String, separator: Option[String] = Option(",")): List[String]
produces a scala list, either from a StringList or a comma-separated string value
produces a scala list, either from a StringList or a comma-separated string value
- path
the config path
- separator
if specified, the value at the given path will be parsed if it is a string and not a stringlist
-
implicit
def
asRichConfig(c: Config): RichConfig
- Definition Classes
- LowPriorityArgs4cImplicits
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
collectAsMap: Map[String, String]
- returns
the configuration as a map
-
def
collectAsStrings: List[(String, String)]
- returns
the configuration as a set of key/value tuples
-
def
encrypt(password: Array[Byte]): Array[Byte]
- returns
the encrypted configuration
-
def
entries: Set[Entry[String, ConfigValue]]
- returns
the configuration entries as a set of entries
-
def
entryPairs: Set[(String, ConfigValue)]
- returns
the configuration entries as a set of entry tuples
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def filter(path: (String) ⇒ Boolean): Config
- def filterNot(path: (String) ⇒ Boolean): Config
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
intersect(other: Config): Config
- returns
the configuration representing the intersection of the two configuration entries
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
origins: List[String]
- returns
a sorted list of the origins from when the config values come
-
def
pathRoots: List[String]
The available config roots.
The available config roots.
e.g. of a config has
foo.bar.x = 1 java.home = /etc/java bar.enabled = true bar.user = root
The 'pathRoots' would return a [bar, foo, java]
- returns
a sorted list of the root entries to the config.
-
def
paths: List[String]
- returns
all the unique paths for this configuration
-
def
showIfSpecified(obscure: (String, String) ⇒ String = obscurePassword(_, _)): Option[String]
If 'show=X' is specified, configuration values which contain X in their path will be displayed with the values matching 'obscure' obscured.
If 'show=X' is specified, configuration values which contain X in their path will be displayed with the values matching 'obscure' obscured.
If 'X' is 'all' or 'root', then the entire configuration is rendered.
This can be useful to debug other command-line args (to ensure they take the desired effect) or to validate the environment variable replacement
- obscure
a function which takes a dotted configuration path and string value and returns the value to display
- returns
the optional value of what's pointed to if 'show=<path>' is specified
-
def
summary(obscure: (String, String) ⇒ String = obscurePassword(_, _)): String
Return a property-like summary of the config using the pathFilter to trim property entries
Return a property-like summary of the config using the pathFilter to trim property entries
- obscure
a function which will 'safely' replace any config values with an obscured value
- returns
a summary of the configuration
-
def
summaryEntries(obscure: (String, String) ⇒ String = obscurePassword(_, _)): List[StringEntry]
Return a property-like summary of the config using the 'obscure' function to mask sensitive entries
Return a property-like summary of the config using the 'obscure' function to mask sensitive entries
- obscure
a function which will 'safely' replace any config values with an obscured value
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toMap: Map[String, ConfigValue]
- returns
the config as a map
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
uniquePaths: List[String]
And example which uses most of the below stuff to showcase what this is for Note : writing a 'diff' using this would be pretty straight forward
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
withPaths(paths: List[String]): Config
- returns
this configuration which only contains the specified paths
-
def
withPaths(first: String, theRest: String*): Config
- first
the first path to include (keep)
- theRest
any other paths to keep
- returns
this configuration which only contains the specified paths
-
def
withUserArgs(args: Array[String], unrecognizedArg: (String) ⇒ Config = ParseArg.Throw): Config
Overlay the given arguments over this configuration, where the arguments are taken to be in the form:
Overlay the given arguments over this configuration, where the arguments are taken to be in the form:
$ the path to a configuration file, either on the classpath or file system $ a <key>=<value> pair where the key is a 'path.to.a.configuration.entry'
- args
the user arguments in the form <key>=<value>, <filePath> or <fileOnTheClasspath>
- unrecognizedArg
what to do with malformed user input
- returns
a configuration with the given user-argument overrides applied over top
- def without(configPaths: TraversableOnce[String]): Config
- def without(firstPath: String, theRest: String*): Config
- def without(other: Config): Config
-
def
withoutSystem: Config
this config w/o the system properties or environment variables