Class name together with package name might be a long string. You
can define short cut for a class name.
To define the short cut for a class
name, you must define a Map containing the mapping between the short cut and
the real class name. The Map must be defined in your TagProvider, together
with your element definition. You must use
classTable as
the id:
<map id="classTable">
<entry key="simpleElement" value="mypackage.SimpleElement" />
</map>
With this factory, you can define your element
as follows:
<simpleElement id="aSimpleElement" />
You
can use the full class name too. The <simpleElement id="aSimpleElement"
/> equals <mypackage.SimpleElement id="aSimpleElement"
/>.
The following table lists the predefined short cuts for
class names:
Table 1. Short cut |
Class name |
map |
java.util.HashMap |
list |
java.util.ArrayList |
set |
java.util.HashSet |
props |
java.util.Properties |