Package org.jboss.resteasy.spi.config

## Class DefaultConfiguration

- java.lang.Object
- - org.jboss.resteasy.spi.config.DefaultConfiguration

- All Implemented Interfaces:
    `Configuration`

      public class DefaultConfiguration
      extends Object
      implements Configuration

  A default configuration which searches for a property in the following order:
  1. System properties
  2. Environment variables
  3. `ResteasyConfiguration`
  Author:
    James R. Perkins

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultConfiguration()` | Creates a new configuration .
    `DefaultConfiguration​(ResteasyConfiguration config)` | Creates a new configuration which uses the configuration to resolve the values.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `<T> Optional<T>` | `getOptionalValue​(String name, Class<T> type)` | Returns the resolved value for the specified type of the named property.
    `<T> T` | `getValue​(String name, Class<T> type)` | Returns the resolved value for the specified type of the named property.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultConfiguration

          public DefaultConfiguration()

      Creates a new configuration .

    - #### DefaultConfiguration

          public DefaultConfiguration​(ResteasyConfiguration config)

      Creates a new configuration which uses the configuration to resolve the values.
      Parameters:
        `config` - the resolver

  - ### Method Detail

    - #### getOptionalValue

          public <T> Optional<T> getOptionalValue​(String name,
                                                  Class<T> type)

      Description copied from interface: `Configuration`
      Returns the resolved value for the specified type of the named property.
      Specified by:
        `getOptionalValue` in interface `Configuration`
      Type Parameters:
        `T` - the property type
      Parameters:
        `name` - the name of the parameter
        `type` - the type to convert the value to
      Returns:
        the resolved optional value

    - #### getValue

          public <T> T getValue​(String name,
                                Class<T> type)

      Description copied from interface: `Configuration`
      Returns the resolved value for the specified type of the named property.
      Specified by:
        `getValue` in interface `Configuration`
      Type Parameters:
        `T` - the property type
      Parameters:
        `name` - the name of the parameter
        `type` - the type to convert the value to
      Returns:
        the resolved value