com.sun.msv.verifier.regexp
Class ContentModelAcceptor
- Acceptor
public abstract class ContentModelAcceptor
base implementation for SimpleAcceptor and ComplexAcceptor
Object | getOwnerType() - gets the "type" object for which this acceptor is working.
|
boolean | stepForward(Acceptor child, StringRef errRef) - eats a child element
A child acceptor created by the
createChildAcceptor method
will be ultimately consumed by the parent through this method.
|
getOwnerType
public Object 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.
- getOwnerType in interface Acceptor
- 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).
stepForward
public boolean stepForward(Acceptor child,
StringRef errRef)
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.
- stepForward in interface Acceptor
- 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.