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

public Class GrammarState

extends DivInGrammarState
Class Inheritance
Known Direct Subclasses
com.sun.msv.reader.trex.ng.GrammarState
Imports
com.sun.msv.grammar.Expression, com.sun.msv.grammar.trex.TREXGrammar

parses <grammar> element. this state is used to parse top-level grammars and nested grammars. grammars merged by include element are handled by MergeGrammarState.

this class provides a new TREXGrammar object to localize names defined within this grammar.

Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected TREXGrammar
protected TREXGrammar

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
endSelf()

Overrides com.sun.msv.reader.ExpressionState.endSelf.

this method is called in endElement method when the state is about to be removed.
protected Expression
makeExpression()

Overrides com.sun.msv.reader.trex.DivInGrammarState.makeExpression.

This method is called from endElement method.
protected void
startSelf()

Overrides com.sun.msv.reader.State.startSelf.

performs a task that should be done before reading any child elements.
Inherited from com.sun.msv.reader.trex.DivInGrammarState:
createChildStategetReaderonEndChild

Field Detail

newGrammarback to summary
protected TREXGrammar newGrammar
previousGrammarback to summary
protected TREXGrammar previousGrammar

Constructor Detail

GrammarStateback to summary
public GrammarState()

Method Detail

endSelfback to summary
public void endSelf()

Overrides com.sun.msv.reader.ExpressionState.endSelf.

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

this method is called in endElement method when the state is about to be removed. derived-class should perform any wrap-up job

makeExpressionback to summary
protected Expression makeExpression()

Overrides com.sun.msv.reader.trex.DivInGrammarState.makeExpression.

Doc from com.sun.msv.reader.ExpressionState.makeExpression.

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

startSelfback to summary
protected void startSelf()

Overrides com.sun.msv.reader.State.startSelf.

Doc from com.sun.msv.reader.State.startSelf.

performs a task that should be done before reading any child elements. derived-class can safely read startTag and/or parentState values.