org.apache.commons.configuration2.builder

## Interface BasicBuilderProperties<T>

- Type Parameters:
    `T` - the type of the result of all set methods for method chaining
  All Known Subinterfaces:
    CombinedBuilderParameters, DatabaseBuilderParameters, FileBasedBuilderParameters, HierarchicalBuilderParameters, INIBuilderParameters, JndiBuilderParameters, MultiFileBuilderParameters, PropertiesBuilderParameters, XMLBuilderParameters
  All Known Implementing Classes:
    BasicBuilderParameters, CombinedBuilderParametersImpl, DatabaseBuilderParametersImpl, FileBasedBuilderParametersImpl, HierarchicalBuilderParametersImpl, INIBuilderParametersImpl, JndiBuilderParametersImpl, MultiFileBuilderParametersImpl, PropertiesBuilderParametersImpl, XMLBuilderParametersImpl

      public interface BasicBuilderProperties<T>

  Definition of a properties interface for basic parameters which are supported by all `ConfigurationBuilder` implementations derived from `BasicConfigurationBuilder`.

  This interface defines the single properties supported by a parameters object. Properties can be set using a fluent API making it convenient for client code to specify concrete property values in a single statement.

  Important note: This interface is not intended to be implemented by client code! It defines a set of available properties and may be extended even in minor releases.

  Since:
    2.0
  Version:
    $Id: BasicBuilderProperties.java 1735895 2016-03-20 18:40:47Z oheger $

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `setBeanHelper(BeanHelper beanHelper)` Sets a `BeanHelper` object to be used by the configuration builder.
    `T` | `setConfigurationDecoder(ConfigurationDecoder decoder)` Sets the `ConfigurationDecoder` object for this configuration.
    `T` | `setConversionHandler(ConversionHandler handler)` Sets the `ConversionHandler` object for this configuration.
    `T` | `setDefaultLookups(Collection<? extends Lookup> lookups)` Adds additional default `Lookup` objects (i.e. lookups which are not associated with a specific prefix) to this configuration object.
    `T` | `setInterpolator(ConfigurationInterpolator ci)` Sets the `ConfigurationInterpolator` to be used for this configuration.
    `T` | `setListDelimiterHandler(ListDelimiterHandler handler)` Sets the value of the listDelimiterHandler property.
    `T` | `setLogger(ConfigurationLogger log)` Sets the logger property.
    `T` | `setParentInterpolator(ConfigurationInterpolator parent)` Sets the parent `ConfigurationInterpolator` for this configuration's `ConfigurationInterpolator`.
    `T` | `setPrefixLookups(Map<String,? extends Lookup> lookups)` Sets additional `Lookup` objects for specific prefixes for this configuration object.
    `T` | `setSynchronizer(Synchronizer sync)` Sets the `Synchronizer` object for this configuration.
    `T` | `setThrowExceptionOnMissing(boolean b)` Sets the value of the throwExceptionOnMissing property.

- - ### Method Detail

    - #### setLogger

          T setLogger(ConfigurationLogger log)

      Sets the logger property. With this property a concrete `ConfigurationLogger` object can be set for the configuration. Thus logging behavior can be controlled.
      Parameters:
        `log` - the `Log` for the configuration produced by this builder
      Returns:
        a reference to this object for method chaining

    - #### setThrowExceptionOnMissing

          T setThrowExceptionOnMissing(boolean b)

      Sets the value of the throwExceptionOnMissing property. This property controls the configuration's behavior if missing properties are queried: a value of true causes the configuration to throw an exception, for a value of false it will return null values. (Note: Methods returning a primitive data type will always throw an exception if the property is not defined.)
      Parameters:
        `b` - the value of the property
      Returns:
        a reference to this object for method chaining

    - #### setListDelimiterHandler

          T setListDelimiterHandler(ListDelimiterHandler handler)

      Sets the value of the listDelimiterHandler property. This property defines the object responsible for dealing with list delimiter and escaping characters. Note: `AbstractConfiguration` does not allow setting this property to null. If the default `ListDelimiterHandler` is to be used, do not call this method.
      Parameters:
        `handler` - the `ListDelimiterHandler`
      Returns:
        a reference to this object for method chaining

    - #### setInterpolator

          T setInterpolator(ConfigurationInterpolator ci)

      Sets the `ConfigurationInterpolator` to be used for this configuration. Using this method a custom `ConfigurationInterpolator` can be set which can be freely configured. Alternatively, it is possible to add custom `Lookup` objects using other methods provided by this interface.
      Parameters:
        `ci` - the `ConfigurationInterpolator` for this configuration
      Returns:
        a reference to this object for method chaining

    - #### setPrefixLookups

          T setPrefixLookups(Map<String,? extends Lookup> lookups)

      Sets additional `Lookup` objects for specific prefixes for this configuration object. All `Lookup` objects contained in the given map are added to the configuration's `ConfigurationInterpolator`. Note: This method only takes effect if no `ConfigurationInterpolator` is set using the `setInterpolator(ConfigurationInterpolator)` method.
      Parameters:
        `lookups` - a map with `Lookup` objects and their associated prefixes
      Returns:
        a reference to this object for method chaining
      See Also:
        `ConfigurationInterpolator.registerLookups(Map)`

    - #### setDefaultLookups

          T setDefaultLookups(Collection<? extends Lookup> lookups)

      Adds additional default `Lookup` objects (i.e. lookups which are not associated with a specific prefix) to this configuration object. Note: This method only takes effect if no `ConfigurationInterpolator` is set using the `setInterpolator(ConfigurationInterpolator)` method.
      Parameters:
        `lookups` - a collection with `Lookup` objects to be added as default lookups at the configuration's `ConfigurationInterpolator`
      Returns:
        a reference to this object for method chaining
      See Also:
        `ConfigurationInterpolator.addDefaultLookups(Collection)`

    - #### setParentInterpolator

          T setParentInterpolator(ConfigurationInterpolator parent)

      Sets the parent `ConfigurationInterpolator` for this configuration's `ConfigurationInterpolator`. Setting a parent `ConfigurationInterpolator` can be used for defining a default behavior for variables which cannot be resolved.
      Parameters:
        `parent` - the new parent `ConfigurationInterpolator`
      Returns:
        a reference to this object for method chaining
      See Also:
        `ConfigurationInterpolator.setParentInterpolator(ConfigurationInterpolator)`

    - #### setSynchronizer

          T setSynchronizer(Synchronizer sync)

      Sets the `Synchronizer` object for this configuration. This object is used to protect this configuration instance against concurrent access. The concrete `Synchronizer` implementation used determines whether a configuration instance is thread-safe or not.
      Parameters:
        `sync` - the `Synchronizer` to be used (a value of null means that a default `Synchronizer` is used)
      Returns:
        a reference to this object for method chaining

    - #### setConversionHandler

          T setConversionHandler(ConversionHandler handler)

      Sets the `ConversionHandler` object for this configuration. This object is responsible for all data type conversions required for accessing configuration properties in a specific target type. If this property is not set, a default `ConversionHandler` is used.
      Parameters:
        `handler` - the `ConversionHandler` to be used
      Returns:
        a reference to this object for method chaining

    - #### setConfigurationDecoder

          T setConfigurationDecoder(ConfigurationDecoder decoder)

      Sets the `ConfigurationDecoder` object for this configuration. This object is called when encoded properties are queried using the `getEncodedString()` method.
      Parameters:
        `decoder` - the `ConfigurationDecoder` to be used
      Returns:
        a reference to this object for method chaining

    - #### setBeanHelper

          T setBeanHelper(BeanHelper beanHelper)

      Sets a `BeanHelper` object to be used by the configuration builder. The `BeanHelper` is used to create the managed configuration instance dynamically. It is not a property of the configuration as most other properties defined by this interface. By setting an alternative `BeanHelper` the process of creating configuration instances via reflection can be adapted. (Some specialized configuration builder implementations also use a `BeanHelper` to create complex helper objects during construction of their result object. `CombinedConfigurationBuilder` for instance supports a complex configuration definition format which may contain several specialized bean declarations.) If no specific `BeanHelper` is set, the builder uses the default instance.
      Parameters:
        `beanHelper` - the `BeanHelper` to be used by the builder
      Returns:
        a reference to this object for method chaining

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.