|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.support.FactoryCache<T>
T
- the type of
ConfigurationPropertiesManagement
created and stored by this factory cache.
@ThreadSafe public final class FactoryCache<T extends ConfigurationPropertiesManagement>
Creates and caches configurations.
Required by the ClassPathLoader
to store all encountered configuration properties.
Constructor Summary | |
---|---|
FactoryCache(ConfigurationRepositoryManagement cache, AbstractConfigurationPropertiesFactory<?> factory) Default constructor. |
Method Summary | |
---|---|
ConfigurationPropertiesManagement |
createPropertiesManagement(ConfigurationKey<?> key) Creates an instance of ConfigurationPropertiesManagement . |
ConfigurationPropertiesManagement |
ensureManagement(ConfigurationKey<?> key) Creates an instance of ConfigurationPropertiesManagement . |
ConfigurationRepositoryManagement |
getCache() Returns the cache of currently loaded configurations. |
PropertiesContext |
getContext(Class<?> declaringType) Returns the context for the given type. |
void |
registerDescriptors(Map<Class<?>,List<PropertyDescriptor>> descriptorMap) Registers the list of descriptors to the given declaring types. |
String |
toString() Returns the string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FactoryCache(ConfigurationRepositoryManagement cache, AbstractConfigurationPropertiesFactory<?> factory)
cache
- the cache of currently loaded configurations.
factory
- the factory to create instances of
ConfigurationPropertiesManagement
.
Method Detail |
---|
public ConfigurationRepositoryManagement getCache()
@CheckForNull public PropertiesContext getContext(Class<?> declaringType) throws NullPointerException, ConfigException
declaringType
- the type of a property descriptor.
null
if the
declaringType
is unknown.
ConfigException
- if the context for the descriptor cannot be found.
NullPointerException
- if
declaringType
is
null
.
public void registerDescriptors(Map<Class<?>,List<PropertyDescriptor>> descriptorMap) throws NullPointerException
descriptorMap
- a map of declaring types to their associated descriptors.
NullPointerException
- if
descriptorMap
or if any key of value of that map is
null
.
public ConfigurationPropertiesManagement ensureManagement(ConfigurationKey<?> key)
ConfigurationPropertiesManagement
.
key
- the key to the configuration to be created.
public ConfigurationPropertiesManagement createPropertiesManagement(ConfigurationKey<?> key)
ConfigurationPropertiesManagement
.
key
- the key to the configuration to be created.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |