Trait

args4c

RichConfigOps

Related Doc: package args4c

Permalink

trait RichConfigOps extends Dynamic with LowPriorityArgs4cImplicits

Exposes new operations on a 'config'

Linear Supertypes
LowPriorityArgs4cImplicits, Dynamic, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RichConfigOps
  2. LowPriorityArgs4cImplicits
  3. Dynamic
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class RichArgs extends AnyRef

    Permalink
    Definition Classes
    LowPriorityArgs4cImplicits
  2. implicit class RichString extends AnyRef

    Permalink
    Definition Classes
    LowPriorityArgs4cImplicits

Abstract Value Members

  1. abstract def config: Config

    Permalink

    returns

    the configuration for which we're providing additional functionality

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def asDuration(key: String): Duration

    Permalink

    key

    the configuration path

    returns

    the value at the given key as a scala duration

  5. def asFiniteDuration(key: String): FiniteDuration

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def asJson: String

    Permalink

    returns

    the configuration as a json string

  8. def asList(path: String, separator: Option[String] = Option(",")): List[String]

    Permalink

    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

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def collectAsMap(options: ConfigRenderOptions = defaultRenderOptions): Map[String, String]

    Permalink

    returns

    the configuration as a map

  11. def collectAsStrings(options: ConfigRenderOptions = defaultRenderOptions): Seq[(String, String)]

    Permalink

    returns

    the configuration as a set of key/value tuples

  12. implicit def configAsRichConfig(c: Config): RichConfig

    Permalink
    Definition Classes
    LowPriorityArgs4cImplicits
  13. def defaultRenderOptions: ConfigRenderOptions

    Permalink
  14. def encrypt(password: Array[Byte]): Array[Byte]

    Permalink

    returns

    the encrypted configuration

  15. def entries(arraySyntax: Boolean = true): Set[(String, ConfigValue)]

    Permalink

    arraySyntax

    if true expand arrays with '.[x]' syntax

    returns

    the configuration entries as a set of entries

  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def filter(pathFilter: (String) ⇒ Boolean): Config

    Permalink

    pathFilter

    a predicate used to determine if the configuration path should be kept

    returns

    a new configuration which just keeps the paths which include the provided path predicate

  19. def filterNot(pathFilter: (String) ⇒ Boolean): Config

    Permalink

    pathFilter

    a predicate used to determine if the configuration path should be kept

    returns

    a new configuration which just keeps the paths which do NOT include the provided path predicate

  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hasValue(path: String): Boolean

    Permalink

    path

    the config path

    returns

    true if the config path is set in this config to a non-empty value. This will error if the path specified is an object or a list

  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. def intersect(other: Config): Config

    Permalink

    returns

    the configuration representing the intersection of the two configuration entries

  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def origins: List[String]

    Permalink

    returns

    a sorted list of the origins from when the config values come

  30. def overrideWith(configString: String): Config

    Permalink

    configString

    the configuration (as a string) which should override this config -- essentially the inverse of 'withFallback'

    returns

    a new configuration based on 'configString' with our config as a fallback

  31. def overrideWith(overrideConfig: Config): Config

    Permalink

    overrideConfig

    the configuration (as a string) which should override this config -- essentially the inverse of 'withFallback'

    returns

    a new configuration based on 'configString' with our config as a fallback

  32. def pathRoots: Seq[String]

    Permalink

    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.

  33. def paths(arraySyntax: Boolean = true): Seq[String]

    Permalink

    returns

    all the unique paths for this configuration

  34. def selectDynamic(path: String): Selected

    Permalink
  35. def set(values: Map[String, Any], originDesc: String = "override"): Config

    Permalink
  36. def set(key: String, value: Boolean): Config

    Permalink
  37. def set(key: String, value: String): Config

    Permalink
  38. def set(key: String, value: Long): Config

    Permalink

    key

    the config path

    value

    the value to set

    returns

    a new configuration based on 'configString' with our config as a fallback

  39. def setArray[T](key: String, value: Seq[T], originDesc: String = null): Config

    Permalink
  40. def setArray[T](key: String, firstValue: T, secondValue: T, theRest: T*): Config

    Permalink
  41. def showIfSpecified(obscure: (String, String) ⇒ String = obscurePassword(_, _)): Option[String]

    Permalink

    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

  42. def summary(obscure: (String, String) ⇒ String = obscurePassword(_, _)): String

    Permalink

    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

  43. def summaryEntries(obscure: (String, String) ⇒ String = obscurePassword(_, _)): Seq[StringEntry]

    Permalink

    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

  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  45. def toMap: Map[String, ConfigValue]

    Permalink

    returns

    the config as a map

  46. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. def withPaths(paths: Seq[String]): Config

    Permalink

    returns

    this configuration which only contains the specified paths

  51. def withPaths(first: String, theRest: String*): Config

    Permalink

    first

    the first path to include (keep)

    theRest

    any other paths to keep

    returns

    this configuration which only contains the specified paths

  52. def withUserArgs(args: Array[String], unrecognizedArg: (String) ⇒ Config = ParseArg.Throw): Config

    Permalink

    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

  53. def without(configPaths: TraversableOnce[String]): Config

    Permalink

    configPaths

    the paths to remove

    returns

    a new configuration with the given paths removed

  54. def without(firstPath: String, theRest: String*): Config

    Permalink

    firstPath

    the first path to remove

    theRest

    the remaining paths to remove

    returns

    a new configuration with the given paths removed

  55. def without(other: Config): Config

    Permalink

    other

    the configuration to remove from this config

    returns

    a new configuration with all values from 'other' removed

Inherited from Dynamic

Inherited from AnyRef

Inherited from Any

Ungrouped