Package gnu.mapping
Class LazyPropertyKey<T>
java.lang.Object
gnu.mapping.PropertyKey<T>
gnu.mapping.LazyPropertyKey<T>
A property whose value can be found lazily.
The property is initialized with a specifier string, which must have the
form of either:
-
"ClassName:fieldName"
: In this case"fieldName"
must be the name of a static field in"ClassName"
, of typeT
. -
"*ClassName:methodName"
: In this case"methodName"
must be the name of a static method that takes one parameter (thePropertySet
), and returns an object of typeT
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(PropertySet container, T defaultValue) Get the value associated with this key in a givenPropertySet
.void
set
(PropertySet container, String specifier) Methods inherited from class gnu.mapping.PropertyKey
get, set
-
Constructor Details
-
LazyPropertyKey
-
-
Method Details
-
get
Description copied from class:PropertyKey
Get the value associated with this key in a givenPropertySet
. ReturndefaultValue
if there is no association for this key.- Overrides:
get
in classPropertyKey<T>
-
set
-