Top Description Fields Constructors Methods
com.sun.msv.reader.trex

public abstract Class NameClassWithChildState

extends NameClassState
implements NameClassOwner
Class Inheritance
All Implemented Interfaces
com.sun.msv.reader.trex.NameClassOwner
Known Direct Subclasses
com.sun.msv.reader.trex.ng.NGNameState, com.sun.msv.reader.trex.NameClassChoiceState, com.sun.msv.reader.trex.NameClassDifferenceState, com.sun.msv.reader.trex.NameClassNotState
Imports
com.sun.msv.grammar.NameClass, com.sun.msv.reader.State, com.sun.msv.util.StartTagInfo

parses name class that has child name classes
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected boolean
allowNullChild

if this flag is true, then it is OK not to have any children.

protected NameClass
nameClass

name class object that is being created.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected NameClass
annealNameClass(NameClass nameClass)

performs final wrap-up and returns a fully created NameClass object that represents this element.

protected abstract NameClass
castNameClass(NameClass halfCastedNameClass, NameClass newChildNameClass)

combines half-made name class and newly found child name class into the name class.

protected State
createChildState(StartTagInfo tag)

Implements abstract com.sun.msv.reader.SimpleState.createChildState.

creates appropriate child state object for this element
protected final NameClass
makeNameClass()

Implements abstract com.sun.msv.reader.trex.NameClassState.makeNameClass.

This method is called from endElement method.
public final void
onEndChild(NameClass childNameClass)

Implements com.sun.msv.reader.trex.NameClassOwner.onEndChild.

receives a Pattern object that is contained in this element.
Inherited from com.sun.msv.reader.trex.NameClassState:
endSelfgetPropagatedNamespace

Field Detail

allowNullChildback to summary
protected boolean allowNullChild

if this flag is true, then it is OK not to have any children.

nameClassback to summary
protected NameClass nameClass

name class object that is being created. See castNameClass(NameClass, NameClass) and annealNameClass(NameClass) methods for how a pattern will be created.

Constructor Detail

NameClassWithChildStateback to summary
public NameClassWithChildState()

Method Detail

annealNameClassback to summary
protected NameClass annealNameClass(NameClass nameClass)

performs final wrap-up and returns a fully created NameClass object that represents this element.

castNameClassback to summary
protected abstract NameClass castNameClass(NameClass halfCastedNameClass, NameClass newChildNameClass)

combines half-made name class and newly found child name class into the name class.

Say this container has three child name class n1,n2, and n3. Then, the name class of this container will be made by the following method invocations.

  annealNameClass( castNameClass( castNameClass( castNameClass(null,p1), p2), p3 ) )
createChildStateback to summary
protected State createChildState(StartTagInfo tag)

Implements abstract com.sun.msv.reader.SimpleState.createChildState.

Doc from com.sun.msv.reader.SimpleState.createChildState.

creates appropriate child state object for this element

makeNameClassback to summary
protected final NameClass makeNameClass()

Implements abstract com.sun.msv.reader.trex.NameClassState.makeNameClass.

Doc from com.sun.msv.reader.trex.NameClassState.makeNameClass.

This method is called from endElement method. Implementation has to provide NameClass object that represents the content of this element.

onEndChildback to summary
public final void onEndChild(NameClass childNameClass)

Implements com.sun.msv.reader.trex.NameClassOwner.onEndChild.

receives a Pattern object that is contained in this element.