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

public abstract Class ExpressionWithChildState

extends ExpressionState
implements ExpressionOwner
Class Inheritance
All Implemented Interfaces
com.sun.msv.reader.ExpressionOwner
Known Direct Subclasses
com.sun.msv.reader.InterleaveState, com.sun.msv.reader.SequenceState, com.sun.msv.reader.relax.core.MixedState, com.sun.msv.reader.trex.classic.ConcurState, com.sun.msv.reader.xmlschema.AttributeState, com.sun.msv.reader.xmlschema.ComplexContentState, com.sun.msv.reader.xmlschema.ElementDeclState, com.sun.msv.reader.xmlschema.RedefinableDeclState, com.sun.msv.reader.xmlschema.SimpleContentState, com.sun.msv.reader.ChoiceState
Imports
com.sun.msv.grammar.Expression, com.sun.msv.util.StartTagInfo

State that parses Expression which contains other expressions.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected Expression
exp

expression object that is being created.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Expression
annealExpression(Expression exp)

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

protected abstract Expression
castExpression(Expression halfCastedExpression, Expression newChildExpression)

combines half-made expression and newly found child expression into the expression.

protected State
createChildState(StartTagInfo tag)

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

creates appropriate child state object for this element
protected Expression
defaultExpression()

computes default expression.

protected Expression
initialExpression()

sets initial pattern

protected final Expression
makeExpression()

Implements abstract com.sun.msv.reader.ExpressionState.makeExpression.

This method is called from endElement method.
public final void
onEndChild(Expression childExpression)

Implements com.sun.msv.reader.ExpressionOwner.onEndChild.

receives a Pattern object that is contained in this element.
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.ExpressionState:
endSelf

Field Detail

expback to summary
protected Expression exp

expression object that is being created. See castPattern and annealPattern methods for how will a pattern be created.

Constructor Detail

ExpressionWithChildStateback to summary
public ExpressionWithChildState()

Method Detail

annealExpressionback to summary
protected Expression annealExpression(Expression exp)

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

castExpressionback to summary
protected abstract Expression castExpression(Expression halfCastedExpression, Expression newChildExpression)

combines half-made expression and newly found child expression into the expression.

Say this container has three child expression exp1,exp2, and exp3. Then, the expression of this state will be made by the following method invocations.

  annealExpression(
    castExpression(
      castExpression(
        castExpression(null,exp1), exp2), exp3 ) )
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

defaultExpressionback to summary
protected Expression defaultExpression()

computes default expression. this method is called before annealExpression when no child expression is given during parsing. return null to signal an error.

initialExpressionback to summary
protected Expression initialExpression()

sets initial pattern

makeExpressionback to summary
protected final Expression makeExpression()

Implements abstract com.sun.msv.reader.ExpressionState.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.

onEndChildback to summary
public final void onEndChild(Expression childExpression)

Implements com.sun.msv.reader.ExpressionOwner.onEndChild.

receives a Pattern object that is contained in 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.