Package com.sun.tools.jxc.gen.config
Class NGCCInterleaveFilter
- java.lang.Object
-
- com.sun.tools.jxc.gen.config.NGCCInterleaveFilter
-
- All Implemented Interfaces:
NGCCEventReceiver,NGCCEventSource
public abstract class NGCCInterleaveFilter extends Object implements NGCCEventSource, NGCCEventReceiver
Dispatches incoming events into sub handlers appropriately so that the interleaving semantics will be correctly realized.Auto-generated, do not edit.
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
-
Field Summary
Fields Modifier and Type Field Description protected NGCCEventReceiver[]_receiversevent receiverse.
-
Constructor Summary
Constructors Modifier Constructor Description protectedNGCCInterleaveFilter(NGCCHandler parent, int cookie)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidenterAttribute(String uri, String localName, String qname)voidenterElement(String uri, String localName, String qname, Attributes atts)protected abstract intfindReceiverOfAttribute(String uri, String local)Returns the handler that can receive the given attribute, or null.protected abstract intfindReceiverOfElement(String uri, String local)Implemented by the generated code to determine the handler that can receive the given element.protected abstract intfindReceiverOfText()Returns the handler that can receive text events, or null.voidjoinByEnterAttribute(NGCCEventReceiver source, String uri, String local, String qname)voidjoinByEnterElement(NGCCEventReceiver source, String uri, String local, String qname, Attributes atts)Joins all the child receivers.voidjoinByLeaveAttribute(NGCCEventReceiver source, String uri, String local, String qname)voidjoinByLeaveElement(NGCCEventReceiver source, String uri, String local, String qname)voidjoinByText(NGCCEventReceiver source, String value)voidleaveAttribute(String uri, String localName, String qname)voidleaveElement(String uri, String localName, String qname)intreplace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler)Replaces an old handler with a new handler, and returns ID of the EventReceiver thread.voidsendEnterAttribute(int threadId, String uri, String local, String qname)voidsendEnterElement(int threadId, String uri, String local, String qname, Attributes atts)Sends an enter element event to the specified EventReceiver thread.voidsendLeaveAttribute(int threadId, String uri, String local, String qname)voidsendLeaveElement(int threadId, String uri, String local, String qname)voidsendText(int threadId, String value)protected voidsetHandlers(NGCCEventReceiver[] receivers)voidtext(String value)
-
-
-
Field Detail
-
_receivers
protected NGCCEventReceiver[] _receivers
event receiverse.
-
-
Constructor Detail
-
NGCCInterleaveFilter
protected NGCCInterleaveFilter(NGCCHandler parent, int cookie)
-
-
Method Detail
-
setHandlers
protected void setHandlers(NGCCEventReceiver[] receivers)
-
replace
public int replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler)
Description copied from interface:NGCCEventSourceReplaces an old handler with a new handler, and returns ID of the EventReceiver thread.- Specified by:
replacein interfaceNGCCEventSource
-
enterElement
public void enterElement(String uri, String localName, String qname, Attributes atts) throws SAXException
- Specified by:
enterElementin interfaceNGCCEventReceiver- Throws:
SAXException
-
leaveElement
public void leaveElement(String uri, String localName, String qname) throws SAXException
- Specified by:
leaveElementin interfaceNGCCEventReceiver- Throws:
SAXException
-
enterAttribute
public void enterAttribute(String uri, String localName, String qname) throws SAXException
- Specified by:
enterAttributein interfaceNGCCEventReceiver- Throws:
SAXException
-
leaveAttribute
public void leaveAttribute(String uri, String localName, String qname) throws SAXException
- Specified by:
leaveAttributein interfaceNGCCEventReceiver- Throws:
SAXException
-
text
public void text(String value) throws SAXException
- Specified by:
textin interfaceNGCCEventReceiver- Throws:
SAXException
-
findReceiverOfElement
protected abstract int findReceiverOfElement(String uri, String local)
Implemented by the generated code to determine the handler that can receive the given element.- Returns:
- Thread ID of the receiver that can handle this event, or -1 if none.
-
findReceiverOfAttribute
protected abstract int findReceiverOfAttribute(String uri, String local)
Returns the handler that can receive the given attribute, or null.
-
findReceiverOfText
protected abstract int findReceiverOfText()
Returns the handler that can receive text events, or null.
-
joinByEnterElement
public void joinByEnterElement(NGCCEventReceiver source, String uri, String local, String qname, Attributes atts) throws SAXException
Joins all the child receivers.This method is called by a child receiver when it sees something that it cannot handle, or by this object itself when it sees an event that it can't process.
This method forces children to move to its final state, then revert to the parent.
- Parameters:
source- If this method is called by one of the child receivers, the receiver object. If this method is called by itself, null.- Throws:
SAXException
-
joinByLeaveElement
public void joinByLeaveElement(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException
- Throws:
SAXException
-
joinByEnterAttribute
public void joinByEnterAttribute(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException
- Throws:
SAXException
-
joinByLeaveAttribute
public void joinByLeaveAttribute(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException
- Throws:
SAXException
-
joinByText
public void joinByText(NGCCEventReceiver source, String value) throws SAXException
- Throws:
SAXException
-
sendEnterAttribute
public void sendEnterAttribute(int threadId, String uri, String local, String qname) throws SAXException- Specified by:
sendEnterAttributein interfaceNGCCEventSource- Throws:
SAXException
-
sendEnterElement
public void sendEnterElement(int threadId, String uri, String local, String qname, Attributes atts) throws SAXExceptionDescription copied from interface:NGCCEventSourceSends an enter element event to the specified EventReceiver thread.- Specified by:
sendEnterElementin interfaceNGCCEventSource- Throws:
SAXException
-
sendLeaveAttribute
public void sendLeaveAttribute(int threadId, String uri, String local, String qname) throws SAXException- Specified by:
sendLeaveAttributein interfaceNGCCEventSource- Throws:
SAXException
-
sendLeaveElement
public void sendLeaveElement(int threadId, String uri, String local, String qname) throws SAXException- Specified by:
sendLeaveElementin interfaceNGCCEventSource- Throws:
SAXException
-
sendText
public void sendText(int threadId, String value) throws SAXException- Specified by:
sendTextin interfaceNGCCEventSource- Throws:
SAXException
-
-