Package com.sun.msv.reader.trex
Class NameClassWithChildState
- java.lang.Object
-
- com.sun.msv.reader.State
-
- com.sun.msv.reader.SimpleState
-
- com.sun.msv.reader.trex.NameClassState
-
- com.sun.msv.reader.trex.NameClassWithChildState
-
- All Implemented Interfaces:
NameClassOwner,org.xml.sax.ContentHandler
- Direct Known Subclasses:
NameClassChoiceState,NameClassDifferenceState,NameClassNotState,NGNameState
public abstract class NameClassWithChildState extends NameClassState implements NameClassOwner
parses name class that has child name classes
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowNullChildif this flag is true, then it is OK not to have any children.protected NameClassnameClassname class object that is being created.
-
Constructor Summary
Constructors Constructor Description NameClassWithChildState()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected NameClassannealNameClass(NameClass nameClass)performs final wrap-up and returns a fully created NameClass object that represents this element.protected abstract NameClasscastNameClass(NameClass halfCastedNameClass, NameClass newChildNameClass)combines half-made name class and newly found child name class into the name class.protected StatecreateChildState(StartTagInfo tag)creates appropriate child state object for this elementprotected NameClassmakeNameClass()This method is called from endElement method.voidonEndChild(NameClass childNameClass)receives a Pattern object that is contained in this element.-
Methods inherited from class com.sun.msv.reader.trex.NameClassState
endSelf, getPropagatedNamespace
-
Methods inherited from class com.sun.msv.reader.SimpleState
endDocument, endElement, isGrammarElement, startElement
-
Methods inherited from class com.sun.msv.reader.State
_assert, callInterceptExpression, characters, endPrefixMapping, getBaseURI, getLocation, getParentState, getStartTag, ignorableWhitespace, init, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, startSelf
-
-
-
-
Field Detail
-
nameClass
protected NameClass nameClass
name class object that is being created. SeecastNameClass(NameClass, NameClass)andannealNameClass(NameClass)methods for how a pattern will be created.
-
allowNullChild
protected boolean allowNullChild
if this flag is true, then it is OK not to have any children.
-
-
Method Detail
-
onEndChild
public final void onEndChild(NameClass childNameClass)
receives a Pattern object that is contained in this element.- Specified by:
onEndChildin interfaceNameClassOwner
-
makeNameClass
protected final NameClass makeNameClass()
Description copied from class:NameClassStateThis method is called from endElement method. Implementation has to provide NameClass object that represents the content of this element.- Specified by:
makeNameClassin classNameClassState
-
createChildState
protected State createChildState(StartTagInfo tag)
Description copied from class:SimpleStatecreates appropriate child state object for this element- Specified by:
createChildStatein classSimpleState
-
castNameClass
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 ) )
-
-