Top Description Fields Constructors Methods
com.sun.msv.verifier.regexp

public abstract Class ContentModelAcceptor

extends ExpressionAcceptor
Class Inheritance
Known Direct Subclasses
com.sun.msv.verifier.regexp.SimpleAcceptor, com.sun.msv.verifier.regexp.ComplexAcceptorBaseImpl
Imports
com.sun.msv.grammar.ElementExp, .Expression, com.sun.msv.util.StringRef, com.sun.msv.verifier.Acceptor

base implementation for SimpleAcceptor and ComplexAcceptor
Author
Kohsuke KAWAGUCHI

Field Summary

Inherited from com.sun.msv.verifier.regexp.ExpressionAcceptor:
docDeclignoreUndeclaredAttributes

Constructor Summary

AccessConstructor and Description
protected
ContentModelAcceptor(REDocumentDeclaration docDecl, Expression exp, boolean ignoreUndeclaredAttributes)

Method Summary

Modifier and TypeMethod and Description
protected Acceptor
createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives)

Implements abstract com.sun.msv.verifier.regexp.ExpressionAcceptor.createAcceptor.

creates actual Acceptor object from the computed result.
public Object
getOwnerType()

Implements com.sun.msv.verifier.Acceptor.getOwnerType.

gets the "type" object for which this acceptor is working.
public boolean
stepForward(Acceptor child, StringRef errRef)

Implements com.sun.msv.verifier.Acceptor.stepForward.

eats a child element

A child acceptor created by the createChildAcceptor method will be ultimately consumed by the parent through this method.

Inherited from com.sun.msv.verifier.regexp.ExpressionAcceptor:
createChildAcceptordiagnoseUncompletedContentgetExpressiongetStringCareLevelisAcceptStateonAttributeonAttributeonAttribute2onEndAttributesonTextonText2stepForwardstepForwardByContinuation

Constructor Detail

ContentModelAcceptorback to summary
protected ContentModelAcceptor(REDocumentDeclaration docDecl, Expression exp, boolean ignoreUndeclaredAttributes)

Method Detail

createAcceptorback to summary
protected Acceptor createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives)

Implements abstract com.sun.msv.verifier.regexp.ExpressionAcceptor.createAcceptor.

creates actual Acceptor object from the computed result.

getOwnerTypeback to summary
public Object getOwnerType()

Implements com.sun.msv.verifier.Acceptor.getOwnerType.

Doc from com.sun.msv.verifier.Acceptor.getOwnerType.

gets the "type" object for which this acceptor is working. This method is used for type assignment. Actual Java type of return value depends on the implementation.

Returns:Object

null the callee should return null when it doesn't support type-assignment feature, or type-assignment is impossible for this acceptor (for example by ambiguous grammar).

stepForwardback to summary
public boolean stepForward(Acceptor child, StringRef errRef)

Implements com.sun.msv.verifier.Acceptor.stepForward.

Doc from com.sun.msv.verifier.Acceptor.stepForward.

eats a child element

A child acceptor created by the createChildAcceptor method will be ultimately consumed by the parent through this method.

It is the caller's responsibility to make sure that child acceptor is in the accept state. If it's not, that indicates that some required elements are missing (in other words, contents are not allowed to end here).

It is the callee's responsibility to recover from error of unsatisified child acceptor. That is, even if the caller finds that there are missing elements, it is possible to call this method as if there was no such error.

Returns:boolean

false if an error happens. For example, if the implementation passes an acceptor which is NOT a child of this acceptor, then the callee can return false.