This class implements the Map interface for a Properties instance. Exports all properties from the given Properties instance as
constants, usable from jstl. Implements the Map interface (by delegating everything to the PropertyTree, which really implements
the Map methods directly) so that jstl can translate ${Constants.a} into a call to ConfigConstants.get( "a" ).
The contents of this Map cannot be changed once it has been initialized. Any calls to any of the Map methods made before the
propertyTree has been initialized (i.e. before setProperties has been called) will throw an IllegalStateException.
Jstl converts ${Constants.a.b.c} into get("a").get("b").get("c"), so the properties are stored in a PropertyTree, which converts
the initial set( "a.b.c", "value" ) into construction of the necessary tree structure to support get("a").get("b").get("c").
Implicitly relies on the assumption that the JSP will be calling toString() on the result of the final get , since
get can only return one type, and that type must be the complex one so that further dereferencing will be
possible.
|