Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.configuration
Class DefaultConfigurationBuilder.ConfigurationDeclaration

    java.lang.Object
      org.apache.commons.configuration.beanutils.XMLBeanDeclaration
          org.apache.commons.configuration.DefaultConfigurationBuilder.ConfigurationDeclaration

All Implemented Interfaces:
  BeanDeclaration

Enclosing class:
  DefaultConfigurationBuilder

    protected static class DefaultConfigurationBuilder.ConfigurationDeclaration

extends XMLBeanDeclaration

A specialized `BeanDeclaration` implementation that represents the declaration of a configuration source.

Instances of this class are able to extract all information about a configuration source from the configuration definition file. The declaration of a configuration source is very similar to a bean declaration processed by `XMLBeanDeclaration`. There are very few differences, e.g. the two reserved attributes `optional` and `at` and the fact that a bean factory is never needed.

Field Summary

Fields inherited from class org.apache.commons.configuration.beanutils.XMLBeanDeclaration
`ATTR_BEAN_CLASS, ATTR_BEAN_FACTORY, ATTR_FACTORY_PARAM, ATTR_PREFIX, RESERVED_PREFIX`

Constructor Summary
`DefaultConfigurationBuilder.ConfigurationDeclaration(DefaultConfigurationBuilder builder, HierarchicalConfiguration config)` Creates a new instance of `ConfigurationDeclaration` and initializes it.

Method Summary
`String` | `getAt()` Returns the value of the `at` attribute.
`String` | `getBeanClassName()` Returns the bean's class name.
`String` | `getBeanFactoryName()` Returns the name of the bean factory.
`DefaultConfigurationBuilder` | `getConfigurationBuilder()` Returns the associated configuration builder.
`protected Object` | `interpolate(Object value)` Performs interpolation.
`boolean` | `isOptional()` Returns a flag whether this is an optional configuration.
`protected boolean` | `isReservedNode(ConfigurationNode nd)` Checks whether the given node is reserved.

Methods inherited from class org.apache.commons.configuration.beanutils.XMLBeanDeclaration
`getBeanFactoryParameter, getBeanProperties, getConfiguration, getNestedBeanDeclarations, getNode`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultConfigurationBuilder.ConfigurationDeclaration

    public DefaultConfigurationBuilder.ConfigurationDeclaration(DefaultConfigurationBuilder builder,
                                                                HierarchicalConfiguration config)

  Creates a new instance of `ConfigurationDeclaration` and initializes it.

  Parameters:
    `builder` - the associated configuration builder
    `config` - the configuration this declaration is based onto

Method Detail

### getConfigurationBuilder

    public DefaultConfigurationBuilder getConfigurationBuilder()

  Returns the associated configuration builder.

  Returns:
    the configuration builder

### getAt

    public String getAt()

  Returns the value of the `at` attribute.

  Returns:
    the value of the `at` attribute (can be null)

### isOptional

    public boolean isOptional()

  Returns a flag whether this is an optional configuration.

  Returns:
    a flag if this declaration points to an optional configuration

### getBeanFactoryName

    public String getBeanFactoryName()

  Returns the name of the bean factory. For configuration source declarations always a reserved factory is used. This factory's name is returned by this implementation.

  Specified by:
    `getBeanFactoryName` in interface `BeanDeclaration`
  Overrides:
    `getBeanFactoryName` in class `XMLBeanDeclaration`
  Returns:
    the name of the bean factory

### getBeanClassName

    public String getBeanClassName()

  Returns the bean's class name. This implementation will always return null.

  Specified by:
    `getBeanClassName` in interface `BeanDeclaration`
  Overrides:
    `getBeanClassName` in class `XMLBeanDeclaration`
  Returns:
    the name of the bean's class

### isReservedNode

    protected boolean isReservedNode(ConfigurationNode nd)

  Checks whether the given node is reserved. This method will take further reserved attributes into account

  Overrides:
    `isReservedNode` in class `XMLBeanDeclaration`
  Parameters:
    `nd` - the node
  Returns:
    a flag whether this node is reserved

### interpolate

    protected Object interpolate(Object value)

  Performs interpolation. This implementation will delegate interpolation to the configuration builder, which takes care that the currently constructed configuration is taken into account, too.

  Overrides:
    `interpolate` in class `XMLBeanDeclaration`
  Parameters:
    `value` - the value to be interpolated
  Returns:
    the interpolated value

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.