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.

Author:
Kohsuke KAWAGUCHI

Field Summary
 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 interface com.sun.msv.verifier.Acceptor
STRING_IGNORE, STRING_PROHIBITED, STRING_STRICT
 
Constructor Summary
SimpleAcceptor(REDocumentDeclaration docDecl, Expression combined, ElementExp owner, Expression continuation)
           
 
Method Summary
 Acceptor createClone()
          clones this acceptor.
 Object getOwnerType()
          gets the "type" object for which this acceptor is working.
 
Methods inherited from class com.sun.msv.verifier.regexp.ContentModelAcceptor
stepForward
 
Methods inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
createChildAcceptor, getExpression, getStringCareLevel, isAcceptState, onAttribute, onEndAttributes, onText, stepForwardByContinuation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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.
Overrides:
getOwnerType in class ContentModelAcceptor
Following copied from interface: com.sun.msv.verifier.Acceptor
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.