static class DefaultConfigurationBuilder.FileExtensionConfigurationProvider extends DefaultConfigurationBuilder.FileConfigurationProvider
properties
tag: if the file ends with ".xml" a
XMLPropertiesConfiguration object must be created, otherwise a
PropertiesConfiguration object.Modifier and Type | Field and Description |
---|---|
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.
|
INSTANCE
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
getConfiguration, getEmptyConfiguration, initBeanInstance
fetchConfigurationClass, getConfigurationClass, getConfigurationClassName, loadClass, setConfigurationClass, setConfigurationClassName
createBean, getDefaultBeanClass
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
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 againsprotected 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 declarationjava.lang.Exception
- if an error occurs