Class ComplexAcceptorBaseImpl

    • Field Detail

    • Method Detail

      • onText2

        public final boolean onText2​(java.lang.String literal,
                                     IDContextProvider2 context,
                                     StringRef refErr,
                                     DatatypeRef refType)
        eats string literal
        Specified by:
        onText2 in interface Acceptor
        Overrides:
        onText2 in class ExpressionAcceptor
        context - an object that provides context information necessary to validate some datatypes.
        refErr - if this parameter is non-null, the implementation should try to detect the reason of error and recover from it. and this object should have the error message as its str field.
        refType - if this parameter is non-null and the callee supports type-assignment, the callee will assign the DataType object to this variable. Caller must initialize refType.type to null before calling this method. If the callee doesn't support type-assignment or type-assignment is impossible for this literal (possibly by ambiguous grammar), this variable must kept null.
        Returns:
        false if the literal at this position is not allowed.
      • stepForward

        public final boolean stepForward​(Acceptor child,
                                         StringRef errRef)
        Description copied from interface: Acceptor
        eats a child element

        A 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.

        Specified by:
        stepForward in interface Acceptor
        Overrides:
        stepForward in class ContentModelAcceptor
        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.