public abstract class ExpressionWithChildState extends ExpressionState implements ExpressionOwner
Modifier and Type | Field and Description |
---|---|
protected Expression |
exp
expression object that is being created.
|
Constructor and Description |
---|
ExpressionWithChildState() |
Modifier and Type | Method 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)
creates appropriate child state object for this element
|
protected Expression |
defaultExpression()
computes default expression.
|
protected Expression |
initialExpression()
sets initial pattern
|
protected Expression |
makeExpression()
This method is called from endElement method.
|
void |
onEndChild(Expression childExpression)
receives a Pattern object that is contained in this element.
|
protected void |
startSelf()
performs a task that should be done before reading any child elements.
|
endSelf
endDocument, endElement, isGrammarElement, startElement
_assert, callInterceptExpression, characters, endPrefixMapping, getBaseURI, getLocation, getParentState, getStartTag, ignorableWhitespace, init, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
protected Expression exp
#castPattern
and #annealPattern
methods
for how will a pattern be created.protected void startSelf()
State
protected Expression initialExpression()
protected Expression defaultExpression()
public final void onEndChild(Expression childExpression)
onEndChild
in interface ExpressionOwner
protected final Expression makeExpression()
ExpressionState
makeExpression
in class ExpressionState
protected State createChildState(StartTagInfo tag)
SimpleState
createChildState
in class SimpleState
protected abstract Expression castExpression(Expression halfCastedExpression, Expression newChildExpression)
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 ) )
protected Expression annealExpression(Expression exp)