|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyProvider
Defines an interface to read property values from a source.
PropertySource
,
PropertyManager
Method Summary | |
---|---|
boolean |
containsKey(String name) Checks if a given property is provided by the property provider. |
ConfigurationKey<?> |
getConfigurationKey() The key of the configuration this property provider provides properties for. |
PropertyCollection |
getProperties() Returns the collection of all property values known to the system. |
Property |
getProperty(String name) Returns the property with the given name . |
PropertyLocation |
getSourceId() Returns the unique identifier of the property source. |
boolean |
isLazy() Providers that do not have to fetch their property definitions eagerly return true here. |
Method Detail |
---|
PropertyLocation getSourceId()
ConfigurationKey<?> getConfigurationKey()
@CheckForNull Property getProperty(String name) throws NullPointerException, IllegalArgumentException
name
.
name
- the name of the property to fetch.
NullPointerException
- if
name
is
null
.
IllegalArgumentException
- if the property is not known. A property is not known if its key has not been registered. A property that is registered with the
null
value is known.
PropertyCollection getProperties()
null
.
boolean containsKey(String name) throws NullPointerException
name
- the property name to check.
true
if the provider provides a property for the name,
false
otherwise.
NullPointerException
- if
name
is
null
.
boolean isLazy()
true
here. All others return
false
. Usually providers that fetch properties from a backend store are lazy, while properties on a class path are eager.
Generally: If the provider cannot fetch individual properties easily, then they should fetch them eagerly and hold them in memory. Otherwise they will fetch properties on demand (aka lazily).
true
if the property provider is lazy,
false
if it is eager.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |