Avalon Excalibur uses the properties package located at
org.apache.avalon.excalibur.properties
to
decode resolvable properties. The Avalon Framework Context
object stores values based on name/value pairs. If the
value is resolvable, then it is possible to alter the
value based on another value in the Context.
For example, you can get a Context value like this:
Object val =
PropertyUtil.resolveProperty("component-${parent}", mycontext, false);
|
The PropertyUtil will first lookup the value named "parent" from the context,
and replace "${parent}" with the value of what "parent" was (for our purpose we
will say it was "foo"). Then it will look up the value of "component-foo" from
the Context. The last parameter if true will not throw an exception if the
resource was not found, and if false will throw an exception.