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

public Class SimpleAcceptor

extends ContentModelAcceptor
Class Inheritance
Known Direct Subclasses
com.sun.msv.verifier.regexp.xmlschema.XSAcceptor
Imports
com.sun.msv.grammar.ElementExp, .Expression, com.sun.msv.verifier.Acceptor

Acceptor that will be used when only one ElementExp matches the start tag.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
public final Expression
continuation

the expression that should be used by the parent acceptor once if this acceptor is satisfied.

public final ElementExp
owner

ElementExp that accepted the start tag.

Constructor Summary

AccessConstructor and Description
public
SimpleAcceptor(REDocumentDeclaration docDecl, Expression combined, ElementExp owner, Expression continuation)

Method Summary

Modifier and TypeMethod and Description
public Acceptor
createClone()

Implements com.sun.msv.verifier.Acceptor.createClone.

clones this acceptor.
public final Object
getOwnerType()

Overrides com.sun.msv.verifier.regexp.ContentModelAcceptor.getOwnerType.

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

gets the "type" object for which this acceptor is working.
Inherited from com.sun.msv.verifier.regexp.ContentModelAcceptor:
createAcceptorstepForward

Field Detail

continuationback to summary
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.

ownerback to summary
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

SimpleAcceptorback to summary
public SimpleAcceptor(REDocumentDeclaration docDecl, Expression combined, ElementExp owner, Expression continuation)

Method Detail

createCloneback to summary
public Acceptor createClone()

Implements com.sun.msv.verifier.Acceptor.createClone.

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

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.

getOwnerTypeback to summary
public final Object getOwnerType()

Overrides com.sun.msv.verifier.regexp.ContentModelAcceptor.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).