|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.resource.util.AbstractServiceFactory<ConfigurationPropertiesFactory> de.smartics.properties.api.config.app.ConfigurationPropertiesFactoryFactory
public final class ConfigurationPropertiesFactoryFactory
Creates instances of the ConfigurationPropertiesFactory
.
Instances of ConfigurationPropertiesFactory
create selected implementations of the ConfigurationProperties
interface. This static factory of factories allows to create the factories.
Factories can be created in two ways:
createDefaultFactory()
if the name of the factory is supplied by META-INF/services
createFactory(Class)
or createFactory(String)
if the name is determined by the client code at runtime.Note:
Usually the second way (especially if a class is supplied) is not really necessary since the constructor can be called by the client code with the same effect. But using this factory of factories may be more convenient.
Field Summary | |
---|---|
static ConfigurationPropertiesFactoryFactory |
INSTANCE The singleton. |
Method Summary | ||
---|---|---|
static ConfigurationPropertiesFactory |
createDefaultFactory() Creates the default factory found on the class path. |
|
static
|
createFactory(Class<T> factoryType) Creates a factory of the given type. |
|
static ConfigurationPropertiesFactory |
createFactory(String factoryTypeName) Creates a factory for the given type name. |
Methods inherited from class de.smartics.properties.resource.util.AbstractServiceFactory |
---|
create, create |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ConfigurationPropertiesFactoryFactory INSTANCE
Method Detail |
---|
public static ConfigurationPropertiesFactory createDefaultFactory() throws ConfigurationFactoryException
META-INF/services/de.smartics.properties.api.config.app.ConfigurationPropertiesFactory
.
Issues a warning if more than one implementation is found. Returns an instance of the first implementation found.
null
.
ConfigurationFactoryException
- if no factory can be created.
public static <T extends ConfigurationPropertiesFactory> T createFactory(Class<T> factoryType) throws NullPointerException, ConfigurationFactoryException
T
- the type of the factory.
factoryType
- the type of the factory to create.
null
.
NullPointerException
- if
factoryType
is
null
.
ConfigurationFactoryException
- on any problem creating the requested factory instance.
public static ConfigurationPropertiesFactory createFactory(String factoryTypeName) throws NullPointerException, ConfigurationFactoryException
factoryTypeName
- the fully qualified name of a type that implements
ConfigurationProperties
.
null
.
NullPointerException
- if
factoryTypeName
is
null
.
ConfigurationFactoryException
- on any problem creating the requested factory instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |