Package org.apache.commons.configuration
Class ConfigurationFactory.FileConfigurationFactory
- java.lang.Object
-
- org.apache.commons.digester.AbstractObjectCreationFactory
-
- org.apache.commons.configuration.ConfigurationFactory.DigesterConfigurationFactory
-
- org.apache.commons.configuration.ConfigurationFactory.FileConfigurationFactory
-
- All Implemented Interfaces:
org.apache.commons.digester.ObjectCreationFactory
- Direct Known Subclasses:
ConfigurationFactory.PropertiesConfigurationFactory
,ConfigurationFactory.PropertyListConfigurationFactory
- Enclosing class:
- ConfigurationFactory
public class ConfigurationFactory.FileConfigurationFactory extends ConfigurationFactory.DigesterConfigurationFactory
A tiny inner class that allows the Configuration Factory to let the digester construct FileConfiguration objects that already have the correct base Path set.
-
-
Constructor Summary
Constructors Constructor Description FileConfigurationFactory(java.lang.Class<?> clazz)
C'tor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FileConfiguration
createConfiguration(org.xml.sax.Attributes attributes)
Creates the object, aFileConfiguration
.java.lang.Object
createObject(org.xml.sax.Attributes attributes)
Gets called by the digester.
-
-
-
Constructor Detail
-
FileConfigurationFactory
public FileConfigurationFactory(java.lang.Class<?> clazz)
C'tor- Parameters:
clazz
- The class which we should instantiate.
-
-
Method Detail
-
createObject
public java.lang.Object createObject(org.xml.sax.Attributes attributes) throws java.lang.Exception
Gets called by the digester.- Specified by:
createObject
in interfaceorg.apache.commons.digester.ObjectCreationFactory
- Overrides:
createObject
in classConfigurationFactory.DigesterConfigurationFactory
- Parameters:
attributes
- the actual attributes- Returns:
- the new object
- Throws:
java.lang.Exception
- Couldn't instantiate the requested object.
-
createConfiguration
protected FileConfiguration createConfiguration(org.xml.sax.Attributes attributes) throws java.lang.Exception
Creates the object, aFileConfiguration
.- Parameters:
attributes
- the actual attributes- Returns:
- the file configuration
- Throws:
java.lang.Exception
- if the object could not be created
-
-