|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.beanutils.DefaultBeanFactory
org.apache.commons.configuration.DefaultConfigurationBuilder.ConfigurationProvider
org.apache.commons.configuration.DefaultConfigurationBuilder.FileConfigurationProvider
org.apache.commons.configuration.DefaultConfigurationBuilder.FileExtensionConfigurationProvider
static class DefaultConfigurationBuilder.FileExtensionConfigurationProvider
A specialized configuration provider for file based configurations that
can handle configuration sources whose concrete type depends on the
extension of the file to be loaded. One example is the
properties
tag: if the file ends with ".xml" a
XMLPropertiesConfiguration object must be created, otherwise a
PropertiesConfiguration object.
Field Summary | |
---|---|
private java.lang.Class |
defaultClass
Stores the class to be created when the file extension does not match. |
private java.lang.String |
defaultClassName
Stores the name of the class to be created when the file extension does not match. |
private java.lang.String |
fileExtension
Stores the file extension to be checked against. |
private java.lang.Class |
matchingClass
Stores the class to be created when the file extension matches. |
private java.lang.String |
matchingClassName
Stores the name of the class to be created when the file extension matches. |
Fields inherited from class org.apache.commons.configuration.beanutils.DefaultBeanFactory |
---|
INSTANCE |
Constructor Summary | |
---|---|
DefaultConfigurationBuilder.FileExtensionConfigurationProvider(java.lang.Class matchingClass,
java.lang.Class defaultClass,
java.lang.String extension)
Creates a new instance of FileExtensionConfigurationProvider and initializes it. |
|
DefaultConfigurationBuilder.FileExtensionConfigurationProvider(java.lang.String matchingClassName,
java.lang.String defaultClassName,
java.lang.String extension)
Creates a new instance of FileExtensionConfigurationProvider and initializes it
with the names of the classes to be created. |
Method Summary | |
---|---|
protected java.lang.Object |
createBeanInstance(java.lang.Class beanClass,
BeanDeclaration data)
Creates the configuration object. |
protected java.lang.Class |
fetchDefaultClass()
Returns the default class object, no matter whether it was defined as a class or as a class name. |
protected java.lang.Class |
fetchMatchingClass()
Returns the matching class object, no matter whether it was defined as a class or as a class name. |
Methods inherited from class org.apache.commons.configuration.DefaultConfigurationBuilder.FileConfigurationProvider |
---|
getConfiguration, getEmptyConfiguration, initBeanInstance |
Methods inherited from class org.apache.commons.configuration.DefaultConfigurationBuilder.ConfigurationProvider |
---|
fetchConfigurationClass, getConfigurationClass, getConfigurationClassName, loadClass, setConfigurationClass, setConfigurationClassName |
Methods inherited from class org.apache.commons.configuration.beanutils.DefaultBeanFactory |
---|
createBean, getDefaultBeanClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.Class matchingClass
private java.lang.String matchingClassName
private java.lang.Class defaultClass
private java.lang.String defaultClassName
private java.lang.String fileExtension
Constructor Detail |
---|
public DefaultConfigurationBuilder.FileExtensionConfigurationProvider(java.lang.Class matchingClass, java.lang.Class defaultClass, java.lang.String extension)
FileExtensionConfigurationProvider
and initializes it.
matchingClass
- the class to be created when the file extension
matchesdefaultClass
- the class to be created when the file extension
does not matchextension
- the file extension to be checked againspublic DefaultConfigurationBuilder.FileExtensionConfigurationProvider(java.lang.String matchingClassName, java.lang.String defaultClassName, java.lang.String extension)
FileExtensionConfigurationProvider
and initializes it
with the names of the classes to be created.
matchingClassName
- the name of the class to be created when the
file extension matchesdefaultClassName
- the name of the class to be created when the
file extension does not matchextension
- the file extension to be checked againsMethod Detail |
---|
protected java.lang.Class fetchMatchingClass() throws java.lang.Exception
java.lang.Exception
- if an error occursprotected java.lang.Class fetchDefaultClass() throws java.lang.Exception
java.lang.Exception
- if an error occursprotected java.lang.Object createBeanInstance(java.lang.Class beanClass, BeanDeclaration data) throws java.lang.Exception
createBeanInstance
in class DefaultBeanFactory
beanClass
- the classdata
- the bean declaration
java.lang.Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |