Class DefineState

    • Field Detail

      • exp

        protected Expression exp
        expression object that is being created. See #castPattern and #annealPattern methods for how will a pattern be created.
    • Constructor Detail

      • DefineState

        public DefineState()
    • Method Detail

      • getRef

        public final ReferenceExp getRef()
        Obtains a ReferenceExp that represents the target pattern block.
        Returns:
        null If there was an error in the input, this method may return null.
      • onEndChild

        public final void onEndChild​(Expression child)
        receives a Pattern object that is contained in this element.
        Specified by:
        onEndChild in interface ExpressionOwner
      • startSelf

        protected void startSelf()
        Description copied from class: State
        performs a task that should be done before reading any child elements. derived-class can safely read startTag and/or parentState values.
        Overrides:
        startSelf in class State
      • endSelf

        protected void endSelf()
        Description copied from class: SimpleState
        this method is called in endElement method when the state is about to be removed. derived-class should perform any wrap-up job
        Overrides:
        endSelf in class SimpleState
      • getReference

        protected ReferenceExp getReference()
        Returns:
        null in case of error.
      • doCombine

        protected abstract Expression doCombine​(ReferenceExp baseExp,
                                                Expression newExp,
                                                String combine)
        combines two expressions into one as specified by the combine parameter, and returns a new expression. If the combine parameter is invalid, then return null.