org.apache.tamaya.inject

## Interface ConfigurationInjector

- All Known Implementing Classes:
    DefaultConfigurationInjector

      public interface ConfigurationInjector

  Accessor interface for injection of configuration and configuration templates.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `configure(T instance)` Configures the current instance and registers necessary listener to forward config change events as defined by the current annotations in place.
    `<T> T` | `configure(T instance, org.apache.tamaya.Configuration config)` Configures the current instance and registers necessary listener to forward config change events as defined by the current annotations in place.
    `<T> T` | `createTemplate(Class<T> templateType)` Creates a template implementing the annotated methods based on current configuration data.
    `<T> T` | `createTemplate(Class<T> templateType, org.apache.tamaya.Configuration config)` Creates a template implementting the annotated methods based on current configuration data.
    `<T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T>` | `getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier)` Creates a supplier for configured instances of the given type `T`.
    `<T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T>` | `getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier, org.apache.tamaya.Configuration config)` Creates a supplier for configured instances of the given type `T`.

- - ### Method Detail

    - #### configure

          <T> T configure(T instance)

      Configures the current instance and registers necessary listener to forward config change events as defined by the current annotations in place.
      Type Parameters:
        `T` - the type of the instance.
      Parameters:
        `instance` - the instance to be configured
      Returns:
        the configured instance (allows chaining of operations).

    - #### configure

          <T> T configure(T instance,
                        org.apache.tamaya.Configuration config)

      Configures the current instance and registers necessary listener to forward config change events as defined by the current annotations in place.
      Type Parameters:
        `T` - the type of the instance.
      Parameters:
        `instance` - the instance to be configured
        `config` - the configuration to be used for injection.
      Returns:
        the configured instance (allows chaining of operations).

    - #### createTemplate

          <T> T createTemplate(Class<T> templateType)

      Creates a template implementing the annotated methods based on current configuration data.
      Type Parameters:
        `T` - the type of the template.
      Parameters:
        `templateType` - the type of the template to be created.
      Returns:
        the configured template.

    - #### createTemplate

          <T> T createTemplate(Class<T> templateType,
                             org.apache.tamaya.Configuration config)

      Creates a template implementting the annotated methods based on current configuration data.
      Type Parameters:
        `T` - the type of the template.
      Parameters:
        `config` - the configuration to be used for backing the template.
        `templateType` - the type of the template to be created.
      Returns:
        the configured template.

    - #### getConfiguredSupplier

          <T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier)

      Creates a supplier for configured instances of the given type `T`.
      Type Parameters:
        `T` - the target type.
      Parameters:
        `supplier` - the supplier to create new instances.
      Returns:
        a supplier creating configured instances of `T`.

    - #### getConfiguredSupplier

          <T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier,
                                                                                         org.apache.tamaya.Configuration config)

      Creates a supplier for configured instances of the given type `T`.
      Type Parameters:
        `T` - the target type.
      Parameters:
        `supplier` - the supplier to create new instances.
        `config` - the configuration to be used for backing the supplier.
      Returns:
        a supplier creating configured instances of `T`.

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.