Top Description Fields Constructors Methods
com.sun.tools.jxc.gen.config

public abstract Class NGCCInterleaveFilter

extends Object
implements NGCCEventSource, NGCCEventReceiver
Class Inheritance
All Implemented Interfaces
com.sun.tools.jxc.gen.config.NGCCEventReceiver, com.sun.tools.jxc.gen.config.NGCCEventSource
Imports
org.xml.sax.Attributes, .SAXException

Dispatches incoming events into sub handlers appropriately so that the interleaving semantics will be correctly realized.

Auto-generated, do not edit.

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private final int
_cookie

Cookie given by the parent.

private final NGCCHandler
_parent

Parent handler.

protected NGCCEventReceiver[]
_receivers

event receiverse.

private boolean
isJoining

Set to true when this handler is in the process of joining all branches.

private int
lockCount

Nest level.

private int
lockedReceiver

Receiver that is being locked and therefore receives all the events.

Constructor Summary

AccessConstructor and Description
protected
NGCCInterleaveFilter(NGCCHandler parent, int cookie)

Method Summary

Modifier and TypeMethod and Description
public void
public void
protected abstract int

Returns:

Thread ID of the receiver that can handle this event, or -1 if none.
findReceiverOfAttribute
(String
attribute uri
uri
,
String
attribute local name
local
)

Returns the handler that can receive the given attribute, or null.

protected abstract int

Returns:

Thread ID of the receiver that can handle this event, or -1 if none.
findReceiverOfElement
(String
element uri
uri
,
String
element local name
local
)

Implemented by the generated code to determine the handler that can receive the given element.

protected abstract int

Returns:

Thread ID of the receiver that can handle this event, or -1 if none.
findReceiverOfText
()

Returns the handler that can receive text events, or null.

public void
public void
joinByEnterElement(NGCCEventReceiver
If this method is called by one of the child receivers, the receiver object. If this method is called by itself, null.
source
,
String
Parameter passed to the element event.
uri
,
String
Parameter passed to the element event.
local
,
String
Parameter passed to the element event.
qname
,
Attributes
Parameter passed to the element event.
atts
)

Joins all the child receivers.

public void
public void
public void
public void
public void
public int
replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler)

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.replace.

Replaces an old handler with a new handler, and returns ID of the EventReceiver thread.

public void
public void
sendEnterElement(int threadId, String uri, String local, String qname, Attributes atts)

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.sendEnterElement.

Sends an enter element event to the specified EventReceiver thread.

public void
public void
public void
protected void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_parentback to summary
private final NGCCHandler _parent

Parent handler.

_receiversback to summary
protected NGCCEventReceiver[] _receivers

event receiverse.

isJoiningback to summary
private boolean isJoining

Set to true when this handler is in the process of joining all branches.

lockCountback to summary
private int lockCount

Nest level. Lock will be release when the lockCount becomes 0.

lockedReceiverback to summary
private int lockedReceiver

Receiver that is being locked and therefore receives all the events.

<interleave>
  <element name="foo"/>
  <element name="bar">
    <element name="foo"/>
  </element>
</interlaeve>
When processing inside the bar element, this receiver is "locked" so that it can correctly receive its child foo element.

Constructor Detail

NGCCInterleaveFilterback to summary
protected NGCCInterleaveFilter(NGCCHandler parent, int cookie)

Method Detail

enterAttributeback to summary
public void enterAttribute(String uri, String localName, String qname) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventReceiver.enterAttribute.

Annotations
@Override
enterElementback to summary
public void enterElement(String uri, String localName, String qname, Attributes atts) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventReceiver.enterElement.

Annotations
@Override
findReceiverOfAttributeback to summary
protected abstract int findReceiverOfAttribute(String uri, String local)

Returns the handler that can receive the given attribute, or null.

Parameters
uri:String

attribute uri

local:String

attribute local name

Returns:int

Thread ID of the receiver that can handle this event, or -1 if none.

findReceiverOfElementback to summary
protected abstract int findReceiverOfElement(String uri, String local)

Implemented by the generated code to determine the handler that can receive the given element.

Parameters
uri:String

element uri

local:String

element local name

Returns:int

Thread ID of the receiver that can handle this event, or -1 if none.

findReceiverOfTextback to summary
protected abstract int findReceiverOfText()

Returns the handler that can receive text events, or null.

Returns:int

Thread ID of the receiver that can handle this event, or -1 if none.

joinByEnterAttributeback to summary
public void joinByEnterAttribute(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException
joinByEnterElementback to summary
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:NGCCEventReceiver

If this method is called by one of the child receivers, the receiver object. If this method is called by itself, null.

uri:String

Parameter passed to the element event.

local:String

Parameter passed to the element event.

qname:String

Parameter passed to the element event.

atts:Attributes

Parameter passed to the element event.

Exceptions
SAXException:
for errors
joinByLeaveAttributeback to summary
public void joinByLeaveAttribute(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException
joinByLeaveElementback to summary
public void joinByLeaveElement(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException
joinByTextback to summary
public void joinByText(NGCCEventReceiver source, String value) throws SAXException
leaveAttributeback to summary
public void leaveAttribute(String uri, String localName, String qname) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventReceiver.leaveAttribute.

Annotations
@Override
leaveElementback to summary
public void leaveElement(String uri, String localName, String qname) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventReceiver.leaveElement.

Annotations
@Override
replaceback to summary
public int replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler)

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.replace.

Doc from com.sun.tools.jxc.gen.config.NGCCEventSource.replace.

Replaces an old handler with a new handler, and returns ID of the EventReceiver thread.

Annotations
@Override
sendEnterAttributeback to summary
public void sendEnterAttribute(int threadId, String uri, String local, String qname) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.sendEnterAttribute.

Annotations
@Override
sendEnterElementback to summary
public void sendEnterElement(int threadId, String uri, String local, String qname, Attributes atts) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.sendEnterElement.

Doc from com.sun.tools.jxc.gen.config.NGCCEventSource.sendEnterElement.

Sends an enter element event to the specified EventReceiver thread.

Annotations
@Override
Exceptions
SAXException:
for errors
sendLeaveAttributeback to summary
public void sendLeaveAttribute(int threadId, String uri, String local, String qname) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.sendLeaveAttribute.

Annotations
@Override
sendLeaveElementback to summary
public void sendLeaveElement(int threadId, String uri, String local, String qname) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.sendLeaveElement.

Annotations
@Override
sendTextback to summary
public void sendText(int threadId, String value) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventSource.sendText.

Annotations
@Override
setHandlersback to summary
protected void setHandlers(NGCCEventReceiver[] receivers)
textback to summary
public void text(String value) throws SAXException

Implements com.sun.tools.jxc.gen.config.NGCCEventReceiver.text.

Annotations
@Override