org.softevo.ample.eval
Class XMLPatternFileReader.ParseHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.softevo.ample.eval.XMLPatternFileReader.ParseHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Enclosing class:
XMLPatternFileReader

protected class XMLPatternFileReader.ParseHandler
extends org.xml.sax.helpers.DefaultHandler

The handler used to parse the file.


Field Summary
protected  java.lang.String className
          The class name currently processed.
protected  int discoveryIndex
          The discovery index of the pattern currently analysed.
static java.lang.String EL_CLASS
          String constant for class element.
static java.lang.String EL_METHOD
          String constant for method element.
static java.lang.String EL_PATTERN
          String constant for pattern element.
static java.lang.String EL_PATTERNS
          String constant for pattern element.
static java.lang.String EL_SYMBOLS
          String constant for symbols element.
protected  int lastOccurence
          The last time the pattern occured.
protected  java.util.Vector methods
          The methods.
protected  java.util.HashMap methodToOccurencesMap
           
protected  int occurences
          The number of times the pattern occured.
protected  boolean parsingCalledSymbolsElement
           
protected  java.util.HashSet patterns
          The patterns for the class currently analysed.
 
Constructor Summary
protected XMLPatternFileReader.ParseHandler()
           
 
Method Summary
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Propagates the entry to all associated analysers.
protected  void handleException(AnalysisException exception)
          This method provides default exception handling (currently a call to System.exit().
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Sets the state and the element type depending on the name of the element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EL_PATTERNS

public static final java.lang.String EL_PATTERNS
String constant for pattern element.

See Also:
Constant Field Values

EL_CLASS

public static final java.lang.String EL_CLASS
String constant for class element.

See Also:
Constant Field Values

EL_PATTERN

public static final java.lang.String EL_PATTERN
String constant for pattern element.

See Also:
Constant Field Values

EL_METHOD

public static final java.lang.String EL_METHOD
String constant for method element.

See Also:
Constant Field Values

EL_SYMBOLS

public static final java.lang.String EL_SYMBOLS
String constant for symbols element.

See Also:
Constant Field Values

className

protected java.lang.String className
The class name currently processed.


methods

protected java.util.Vector methods
The methods.


patterns

protected java.util.HashSet patterns
The patterns for the class currently analysed.


discoveryIndex

protected int discoveryIndex
The discovery index of the pattern currently analysed.


occurences

protected int occurences
The number of times the pattern occured.


lastOccurence

protected int lastOccurence
The last time the pattern occured.


parsingCalledSymbolsElement

protected boolean parsingCalledSymbolsElement

methodToOccurencesMap

protected java.util.HashMap methodToOccurencesMap
Constructor Detail

XMLPatternFileReader.ParseHandler

protected XMLPatternFileReader.ParseHandler()
Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
Sets the state and the element type depending on the name of the element.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - the active namespace
localName - the unqualified element name
qName - the qualified element name
atts - the attributes of the element

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
Propagates the entry to all associated analysers.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

handleException

protected void handleException(AnalysisException exception)
This method provides default exception handling (currently a call to System.exit().

Parameters:
exception - the exception that occured