Class BuilderConfigurationWrapperFactory


  • public class BuilderConfigurationWrapperFactory
    extends Object

    A class that allows the creation of configuration objects wrapping a ConfigurationBuilder.

    Using this class special ImmutableConfiguration proxies can be created that delegate all method invocations to another ImmutableConfiguration obtained from a ConfigurationBuilder. For instance, if there is a configuration c wrapping the builder builder, the call c.getString(myKey) is transformed to builder.getConfiguration().getString(myKey).

    There are multiple use cases for such a constellation. One example is that client code can continue working with ImmutableConfiguration objects while under the hood builders are used. Another example is that dynamic configurations can be realized in a transparent way: a client holds a single configuration (proxy) object, but the underlying builder may return a different data object on each call.

    Since:
    2.0