|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.extensions.xml.XMLTagResourceBundle
This class is used to read in the properties and provide access to the tag handlers for various elements based on their attribute values.
| Field Summary | |
private java.util.ResourceBundle |
m_bundle
The ResourceBundle used to read in the properties. |
private java.util.Map |
m_map
Map of the API specified Tag Handlers. |
private static XMLTagResourceBundle |
s_singleton
Handle to the singleton instance. |
| Constructor Summary | |
private |
XMLTagResourceBundle()
A default private constructor. |
| Method Summary | |
static void |
addTagHandler(java.lang.String tagname,
java.lang.String classname)
Add a tag handler. |
private void |
addTagHandlerImpl(java.lang.String tagname,
java.lang.String classname)
Add a tag handler. |
private java.lang.Class |
getClassFromTag(java.lang.String tagname,
boolean debug)
Get the Class for the type of tag handler given. |
private static XMLTagResourceBundle |
getSingleton()
The "default" method that is used to create and initialize a singleton instance. |
static AbstractTagHandler |
getTagHandler(org.w3c.dom.Element element,
IXMLTest test,
java.lang.String type)
A convenience method to get a handle to the AbstractTagHandler implementation. |
private AbstractTagHandler |
getTagHandlerImpl(org.w3c.dom.Element element,
IXMLTest test,
java.lang.String type)
Reads the short name (type) and creates an instance of the tag handler that corresponds to the value from the resource bundle. |
static void |
removeTagHandler(java.lang.String tagname)
Remove a tag handler. |
private void |
removeTagHandlerImpl(java.lang.String tagname)
Remove a tag handler. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static XMLTagResourceBundle s_singleton
private final java.util.Map m_map
private java.util.ResourceBundle m_bundle
| Constructor Detail |
private XMLTagResourceBundle()
Object.Object()| Method Detail |
public static AbstractTagHandler getTagHandler(org.w3c.dom.Element element,
IXMLTest test,
java.lang.String type)
throws XMLException
element - The element for which we need the tag handler.test - The IXMLTestSuite being run.type - The type of element to be handled.
XMLException - if the tag handle cannot be instanciated.
public static void addTagHandler(java.lang.String tagname,
java.lang.String classname)
tagname - Tag name to be registered.classname - Classname to be registered.public static void removeTagHandler(java.lang.String tagname)
tagname - Tagname to be removed.private static XMLTagResourceBundle getSingleton()
private java.lang.Class getClassFromTag(java.lang.String tagname,
boolean debug)
throws XMLException
tagname - TagName to bedebug - True if debugging.
XMLException - may be thrown.
private AbstractTagHandler getTagHandlerImpl(org.w3c.dom.Element element,
IXMLTest test,
java.lang.String type)
throws XMLException
element - The element for which we need the tag handler.test - The testCase being run.type - The type of element to be handled.
XMLException - if the tag handler cannot be instanciated.
private void addTagHandlerImpl(java.lang.String tagname,
java.lang.String classname)
tagname - Tag name to be registered.classname - Classname to be registered.private void removeTagHandlerImpl(java.lang.String tagname)
tagname - Tagname to be removed.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||