public class TestNGContentHandler
extends org.xml.sax.helpers.DefaultHandler
Modifier and Type | Class and Description |
---|---|
private static class |
TestNGContentHandler.Include |
(package private) static class |
TestNGContentHandler.Location |
Modifier and Type | Field and Description |
---|---|
private XmlClass |
m_currentClass |
private java.util.List<XmlClass> |
m_currentClasses |
private int |
m_currentClassIndex |
private java.util.Map<java.lang.String,java.lang.String> |
m_currentClassParameters |
private java.util.List<java.lang.String> |
m_currentDefines |
private java.util.List<java.lang.String> |
m_currentExcludedGroups |
private java.util.List<java.lang.String> |
m_currentExcludedMethods |
private java.lang.String |
m_currentExpression |
private TestNGContentHandler.Include |
m_currentInclude |
private java.util.List<java.lang.String> |
m_currentIncludedGroups |
private java.util.ArrayList<XmlInclude> |
m_currentIncludedMethods |
private int |
m_currentIncludeIndex |
private java.lang.String |
m_currentLanguage |
private java.util.List<java.lang.String> |
m_currentMetaGroup |
private java.lang.String |
m_currentMetaGroupName |
private XmlPackage |
m_currentPackage |
private java.util.List<XmlPackage> |
m_currentPackages |
private java.util.List<java.lang.String> |
m_currentRuns |
private XmlMethodSelector |
m_currentSelector |
private java.util.ArrayList<XmlMethodSelector> |
m_currentSelectors |
private XmlSuite |
m_currentSuite |
private java.util.Map<java.lang.String,java.lang.String> |
m_currentSuiteParameters |
private XmlTest |
m_currentTest |
private int |
m_currentTestIndex |
private java.util.Map<java.lang.String,java.lang.String> |
m_currentTestParameters |
private boolean |
m_enabledTest |
private java.lang.String |
m_fileName |
private boolean |
m_hasWarn |
private java.util.List<java.lang.String> |
m_listeners |
private boolean |
m_loadClasses |
private java.util.Stack<TestNGContentHandler.Location> |
m_locations |
private java.util.List<java.lang.String> |
m_suiteFiles |
private java.util.List<XmlSuite> |
m_suites |
private boolean |
m_validate |
Constructor and Description |
---|
TestNGContentHandler(java.lang.String fileName,
boolean loadClasses) |
Modifier and Type | Method and Description |
---|---|
private boolean |
areWhiteSpaces(char[] ch,
int start,
int length) |
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName) |
void |
error(org.xml.sax.SAXParseException e) |
private static java.lang.String |
expandValue(java.lang.String value) |
XmlSuite |
getSuite() |
private TestNGContentHandler.Location |
popLocation(TestNGContentHandler.Location location) |
private static void |
ppp(java.lang.String s) |
private void |
pushLocation(TestNGContentHandler.Location l) |
org.xml.sax.InputSource |
resolveEntity(java.lang.String systemId,
java.lang.String publicId) |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
NOTE: I only invoke xml*methods (e.g.
|
private java.util.List<java.lang.Integer> |
stringToList(java.lang.String in) |
void |
xmlClasses(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlDefine(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlExclude(boolean start,
org.xml.sax.Attributes attributes) |
void |
xmlGroup(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlInclude(boolean start,
org.xml.sax.Attributes attributes) |
void |
xmlListener(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
void |
xmlListeners(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlMethod(boolean start,
org.xml.sax.Attributes attributes) |
void |
xmlMethodSelector(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
void |
xmlMethodSelectors(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
void |
xmlPackages(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
void |
xmlRun(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlScript(boolean start,
org.xml.sax.Attributes attributes)
Parse <script>
|
void |
xmlSelectorClass(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlSuite(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlSuiteFile(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private void |
xmlTest(boolean start,
org.xml.sax.Attributes attributes)
Parse
|
private XmlSuite m_currentSuite
private XmlTest m_currentTest
private java.util.List<java.lang.String> m_currentDefines
private java.util.List<java.lang.String> m_currentRuns
private java.util.List<XmlClass> m_currentClasses
private int m_currentTestIndex
private int m_currentClassIndex
private int m_currentIncludeIndex
private java.util.List<XmlPackage> m_currentPackages
private XmlPackage m_currentPackage
private java.util.List<XmlSuite> m_suites
private java.util.List<java.lang.String> m_currentIncludedGroups
private java.util.List<java.lang.String> m_currentExcludedGroups
private java.util.Map<java.lang.String,java.lang.String> m_currentTestParameters
private java.util.Map<java.lang.String,java.lang.String> m_currentSuiteParameters
private java.util.Map<java.lang.String,java.lang.String> m_currentClassParameters
private TestNGContentHandler.Include m_currentInclude
private java.util.List<java.lang.String> m_currentMetaGroup
private java.lang.String m_currentMetaGroupName
private java.util.Stack<TestNGContentHandler.Location> m_locations
private XmlClass m_currentClass
private java.util.ArrayList<XmlInclude> m_currentIncludedMethods
private java.util.List<java.lang.String> m_currentExcludedMethods
private java.util.ArrayList<XmlMethodSelector> m_currentSelectors
private XmlMethodSelector m_currentSelector
private java.lang.String m_currentLanguage
private java.lang.String m_currentExpression
private java.util.List<java.lang.String> m_suiteFiles
private boolean m_enabledTest
private java.util.List<java.lang.String> m_listeners
private java.lang.String m_fileName
private boolean m_loadClasses
private boolean m_validate
private boolean m_hasWarn
public TestNGContentHandler(java.lang.String fileName, boolean loadClasses)
private static void ppp(java.lang.String s)
public org.xml.sax.InputSource resolveEntity(java.lang.String systemId, java.lang.String publicId) throws java.io.IOException, org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
java.io.IOException
org.xml.sax.SAXException
private void xmlSuiteFile(boolean start, org.xml.sax.Attributes attributes)
private void xmlSuite(boolean start, org.xml.sax.Attributes attributes)
private void xmlDefine(boolean start, org.xml.sax.Attributes attributes)
private void xmlScript(boolean start, org.xml.sax.Attributes attributes)
private void xmlTest(boolean start, org.xml.sax.Attributes attributes)
public void xmlClasses(boolean start, org.xml.sax.Attributes attributes)
public void xmlListeners(boolean start, org.xml.sax.Attributes attributes)
public void xmlListener(boolean start, org.xml.sax.Attributes attributes)
public void xmlPackages(boolean start, org.xml.sax.Attributes attributes)
public void xmlMethodSelectors(boolean start, org.xml.sax.Attributes attributes)
public void xmlSelectorClass(boolean start, org.xml.sax.Attributes attributes)
public void xmlMethodSelector(boolean start, org.xml.sax.Attributes attributes)
private void xmlMethod(boolean start, org.xml.sax.Attributes attributes)
public void xmlRun(boolean start, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void xmlGroup(boolean start, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
private void xmlInclude(boolean start, org.xml.sax.Attributes attributes)
private void xmlExclude(boolean start, org.xml.sax.Attributes attributes)
private void pushLocation(TestNGContentHandler.Location l)
private TestNGContentHandler.Location popLocation(TestNGContentHandler.Location location)
private java.util.List<java.lang.Integer> stringToList(java.lang.String in)
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
private boolean areWhiteSpaces(char[] ch, int start, int length)
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public XmlSuite getSuite()
private static java.lang.String expandValue(java.lang.String value)