net.sf.swan.xml.input.components
Class Chain
java.lang.Object
|
+--net.sf.swan.xml.input.components.Chain
- All Implemented Interfaces:
- ContextListener
- public class Chain
- extends java.lang.Object
- implements ContextListener
Utility to chain together two ContextListeners
.
The provided outer component gets start element events
before the inner component and end element events
after it. Both are passed the event regardless of whether either
consumes it. If the single argument constructor is used by a subclass,
then this instance itself is the outer component. Text events
and processing instructions are by default only passed to the
outer component.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Chain
protected Chain(ContextListener next)
Chain
public Chain(ContextListener outer,
ContextListener inner)
startElement
public void startElement(StartElementEvent event)
throws EventContextException
- Specified by:
startElement
in interface ContextListener
endElement
public void endElement(EndElementEvent event)
throws EventContextException
- Specified by:
endElement
in interface ContextListener
text
public void text(TextEvent event)
throws EventContextException
- Specified by:
text
in interface ContextListener
processingInstruction
public void processingInstruction(ProcessingInstructionEvent event)
throws EventContextException
- Specified by:
processingInstruction
in interface ContextListener
next
protected ContextListener next()
inner
protected ContextListener inner()
outer
protected ContextListener outer()