org.pf.pax
Class LexicalHandlerDispatcher

java.lang.Object
  extended by org.pf.pax.LexicalHandlerDispatcher
All Implemented Interfaces:
org.xml.sax.ext.LexicalHandler

public class LexicalHandlerDispatcher
extends java.lang.Object
implements org.xml.sax.ext.LexicalHandler

Forwards all method calls to a delegate LexicalHandler which can be exchanged. That is useful if in fact different LexicalHandler instances are needed during one parsing process. The XMLReader.setProperty( "http://xml.org/sax/properties/lexical-handler", handler ) only allows to set the LexicalHandler once.

Version:
1.0
Author:
Manfred Duchrow

Constructor Summary
LexicalHandlerDispatcher()
          Initialize the new instance with no delegate.
LexicalHandlerDispatcher(org.xml.sax.ext.LexicalHandler handler)
          Initialize the new instance with an initial handler to delegate to.
 
Method Summary
 void comment(char[] ch, int start, int length)
           
 void endCDATA()
           
 void endDTD()
           
 void endEntity(java.lang.String name)
           
 org.xml.sax.ext.LexicalHandler getLexicalHandler()
           
 void setLexicalHandler(org.xml.sax.ext.LexicalHandler newValue)
           
 void startCDATA()
           
 void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
           
 void startEntity(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexicalHandlerDispatcher

public LexicalHandlerDispatcher()
Initialize the new instance with no delegate.


LexicalHandlerDispatcher

public LexicalHandlerDispatcher(org.xml.sax.ext.LexicalHandler handler)
Initialize the new instance with an initial handler to delegate to.

Method Detail

getLexicalHandler

public org.xml.sax.ext.LexicalHandler getLexicalHandler()

setLexicalHandler

public void setLexicalHandler(org.xml.sax.ext.LexicalHandler newValue)

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
Specified by:
comment in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endEntity

public void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startEntity

public void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException