Package org.apache.tapestry5.commons

# Interface Configuration<T>

All Known Implementing Classes:
  `ValidatingConfigurationWrapper`

public interface Configuration<T>
Object passed into a service contributor method that allows the method provide contributed values to the service's configuration. A service can collect contributions in three different ways:

- As an un-ordered collection of values
- As an ordered list of values (where each value has a unique id, pre-requisites and post-requisites)
- As a map of keys and values

This implementation is used for un-ordered configuration data. The service defines the type of contribution, in terms of a base class or service interface. Contributions must be compatible with the type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(T object)`
  Adds an object to the service's contribution.
  `void`
  `addInstance(Class<? extends T> clazz)`
  Automatically instantiates an instance of the class, with dependencies injected, and adds it to the configuration.

- ## Method Details

  - ### add

    void add(T object)
    Adds an object to the service's contribution.
    Parameters:
      `object` - to add to the service's configuration

  - ### addInstance

    void addInstance(Class<? extends T> clazz)
    Automatically instantiates an instance of the class, with dependencies injected, and adds it to the configuration. When the configuration type is an interface and the class to be contributed is a local file, then a reloadable proxy for the class will be created and contributed.
    Parameters:
      `clazz` - what class to instantiate
    Since:
      5.1.0.0