FileDocCategorySizeDatePackage
MockHandler.javaAPI DocAndroid 1.5 API4695Wed May 06 22:41:06 BST 2009tests.api.org.xml.sax.support

MockHandler

public class MockHandler extends Object implements ErrorHandler, DocumentHandler, LexicalHandler, DTDHandler, ContentHandler
A helper class that implements the various SAX callback interfaces and logs method calls.

Fields Summary
private MethodLogger
logger
Constructors Summary
public MockHandler(MethodLogger logger)

        super();
        this.logger = logger;
    
Methods Summary
public voidcharacters(char[] ch, int start, int length)

        logger.add("characters", ch, start, length);
    
public voidcomment(char[] ch, int start, int length)

        logger.add("comment", ch, start, length);
    
public voidendCDATA()

        logger.add("endCDATA");
    
public voidendDTD()

        logger.add("endDTD");
    
public voidendDocument()

        logger.add("endDocument");
    
public voidendElement(java.lang.String name)

        logger.add("endElement", name);
    
public voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String name)

        logger.add("endElement", uri, localName, name);
    
public voidendEntity(java.lang.String name)

        logger.add("endEntity", name);
    
public voidendPrefixMapping(java.lang.String prefix)

        logger.add("endPrefixMapping", prefix);
    
public voiderror(org.xml.sax.SAXParseException exception)

        logger.add("error", exception);
    
public voidfatalError(org.xml.sax.SAXParseException exception)

        logger.add("fatalError", exception);
    
public voidignorableWhitespace(char[] ch, int start, int length)

        logger.add("ignorableWhitespace", ch, start, length);
    
public voidnotationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)

        logger.add("notationDecl", name, publicId, systemId);
    
public voidprocessingInstruction(java.lang.String target, java.lang.String data)

        logger.add("processingInstruction", target, data);
    
public voidsetDocumentLocator(org.xml.sax.Locator locator)

        logger.add("setDocumentLocator", locator);
    
public voidskippedEntity(java.lang.String name)

        logger.add("skippedEntity", name);
    
public voidstartCDATA()

        logger.add("startCDATA");
    
public voidstartDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)

        logger.add("startDTD", name, publicId, systemId);
    
public voidstartDocument()

        logger.add("startDocument");
    
public voidstartElement(java.lang.String name, org.xml.sax.AttributeList atts)

        logger.add("startElement", name, atts);
    
public voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes atts)

        logger.add("startElement", uri, localName, name, atts);
    
public voidstartEntity(java.lang.String name)

        logger.add("startEntity", name);
    
public voidstartPrefixMapping(java.lang.String prefix, java.lang.String uri)

        logger.add("startPrefixMapping", prefix, uri);
    
public voidunparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)

        logger.add("unparsedEntityDecl", name, publicId, systemId, notationName);
    
public voidwarning(org.xml.sax.SAXParseException exception)

        logger.add("warning", exception);