Package com.sun.msv.verifier.regexp
Class SimpleAcceptor
- java.lang.Object
-
- com.sun.msv.verifier.regexp.ExpressionAcceptor
-
- com.sun.msv.verifier.regexp.ContentModelAcceptor
-
- com.sun.msv.verifier.regexp.SimpleAcceptor
-
- All Implemented Interfaces:
Acceptor
- Direct Known Subclasses:
XSAcceptor
public class SimpleAcceptor extends ContentModelAcceptor
Acceptor that will be used when only one ElementExp matches the start tag.
-
-
Field Summary
Fields Modifier and Type Field Description Expression
continuation
the expression that should be used by the parent acceptor once if this acceptor is satisfied.ElementExp
owner
ElementExp that accepted the start tag.-
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
Constructors Constructor Description SimpleAcceptor(REDocumentDeclaration docDecl, Expression combined, ElementExp owner, Expression continuation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acceptor
createClone()
clones this acceptor.java.lang.Object
getOwnerType()
gets the "type" object for which this acceptor is working.-
Methods inherited from class com.sun.msv.verifier.regexp.ContentModelAcceptor
createAcceptor, stepForward
-
Methods inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
createChildAcceptor, diagnoseUncompletedContent, getExpression, getStringCareLevel, isAcceptState, onAttribute, onAttribute, onAttribute2, onEndAttributes, onText, onText2, stepForward, stepForwardByContinuation
-
-
-
-
Field Detail
-
continuation
public final Expression continuation
the expression that should be used by the parent acceptor once if this acceptor is satisfied. This field can be null. In that case, the continuation has to be computed.
-
owner
public final ElementExp owner
ElementExp that accepted the start tag. This acceptor is verifying the content model of this ElementExp. This value is usually non-null, but can be null when Verifier is recovering from eariler errors. null owner means this acceptor is "synthesized" just for proper error recovery, therefor there is no owner element expression.
-
-
Constructor Detail
-
SimpleAcceptor
public SimpleAcceptor(REDocumentDeclaration docDecl, Expression combined, ElementExp owner, Expression continuation)
-
-
Method Detail
-
getOwnerType
public final java.lang.Object 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.- Specified by:
getOwnerType
in interfaceAcceptor
- Overrides:
getOwnerType
in classContentModelAcceptor
- 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).
-
createClone
public Acceptor createClone()
Description copied from interface:Acceptor
clones this acceptor.You can keep a "bookmark" of the acceptor by cloning it. This is useful when you are trying to perform "partial validation".
Cloned acceptor will behave in exactly the same way as the original one.
-
-