ConfigMap (Grails 6.0.0)

Package: grails.config

## [Groovy] Interface ConfigMap

- Map

- All Superinterfaces:
    java.lang.Iterable<Map.Entry<java.lang.String, java.lang.Object>>, java.util.Map<java.lang.String, java.lang.Object>

      interface ConfigMap
      extends java.lang.Iterable<Map.Entry<java.lang.String, java.lang.Object>>, java.util.Map<java.lang.String, java.lang.Object>

  API onto application configuration

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.Object` | `at`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `abstract java.lang.Object` | `getAt(java.lang.Object key)` Enables the object[foo] syntax
    `<T>` | `abstract T` | `getProperty(java.lang.String key, java.lang.Class<T> targetType)` Return the property value associated with the given key, or `null` if the key cannot be resolved.
    `<T>` | `abstract T` | `getProperty(java.lang.String key, java.lang.Class<T> targetType, T defaultValue)` Return the property value associated with the given key, or `null` if the key cannot be resolved.
    `<T>` | `abstract T` | `getRequiredProperty(java.lang.String key, java.lang.Class<T> targetType)` Return the property value associated with the given key, converted to the given targetType (never `null`).
    `` | `abstract java.lang.Object` | `navigate(java.lang.String[] path)` Navigate the map for the given path
    `` | `abstract void` | `setAt(java.lang.Object key, java.lang.Object value)` Enables the object[foo] = 'stuff' syntax

- - ### Property Detail

    - #### java.lang.Object at

  - ### Method Detail

    - #### abstract java.lang.Object getAt(java.lang.Object key)

      Enables the object[foo] syntax

      Parameters:
        `key` - The key
      Returns:
        The value or null

    - #### <T> abstract T getProperty(java.lang.String key, java.lang.Class<T> targetType)

      Return the property value associated with the given key, or `null` if the key cannot be resolved.

      Parameters:
        `key` - the property name to resolve
        `targetType` - the expected type of the property value
      See Also:
        getRequiredProperty(String, Class)

    - #### <T> abstract T getProperty(java.lang.String key, java.lang.Class<T> targetType, T defaultValue)

      Return the property value associated with the given key, or `null` if the key cannot be resolved.

      Parameters:
        `key` - the property name to resolve
        `targetType` - the expected type of the property value
      See Also:
        getRequiredProperty(String, Class)

    - #### <T> abstract T getRequiredProperty(java.lang.String key, java.lang.Class<T> targetType)

      Return the property value associated with the given key, converted to the given targetType (never `null`).

      throws:
        IllegalStateException if the given key cannot be resolved

    - #### abstract java.lang.Object navigate(java.lang.String[] path)

      Navigate the map for the given path @return

      Parameters:
        `path` - The path

    - #### abstract void setAt(java.lang.Object key, java.lang.Object value)

      Enables the object[foo] = 'stuff' syntax

      Parameters:
        `key` - The key
        `value` - The value