Package com.sun.msv.verifier.regexp
Class ContentModelAcceptor
java.lang.Object
com.sun.msv.verifier.regexp.ExpressionAcceptor
com.sun.msv.verifier.regexp.ContentModelAcceptor
- All Implemented Interfaces:
Acceptor
- Direct Known Subclasses:
ComplexAcceptorBaseImpl
,SimpleAcceptor
base implementation for SimpleAcceptor and ComplexAcceptor
- Author:
- Kohsuke KAWAGUCHI
-
Field Summary
Fields inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
docDecl, ignoreUndeclaredAttributes
Fields inherited from interface com.sun.msv.verifier.Acceptor
STRING_IGNORE, STRING_PROHIBITED, STRING_STRICT
-
Constructor Summary
ModifierConstructorDescriptionprotected
ContentModelAcceptor
(REDocumentDeclaration docDecl, Expression exp, boolean ignoreUndeclaredAttributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected Acceptor
createAcceptor
(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives) creates actual Acceptor object from the computed result.gets the "type" object for which this acceptor is working.boolean
stepForward
(Acceptor child, StringRef errRef) eats a child elementMethods inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
createChildAcceptor, diagnoseUncompletedContent, getExpression, getStringCareLevel, isAcceptState, onAttribute, onAttribute, onAttribute2, onEndAttributes, onText, onText2, stepForward, stepForwardByContinuation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sun.msv.verifier.Acceptor
createClone
-
Constructor Details
-
ContentModelAcceptor
protected ContentModelAcceptor(REDocumentDeclaration docDecl, Expression exp, boolean ignoreUndeclaredAttributes)
-
-
Method Details
-
stepForward
Description copied from interface:Acceptor
eats a child elementA child acceptor created by the
Acceptor.createChildAcceptor(com.sun.msv.util.StartTagInfo,com.sun.msv.util.StringRef)
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:
- 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.
-
createAcceptor
protected Acceptor createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives) creates actual Acceptor object from the computed result.- Specified by:
createAcceptor
in classExpressionAcceptor
-
getOwnerType
Description copied from interface:Acceptor
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:
- 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).
-