Class AddAction

  • All Implemented Interfaces:
    ContextAware

    public class AddAction
    extends Action
    This action adds the two integers at the top of the stack (they are removed) and pushes the result to the top the stack.
    • Constructor Detail

      • AddAction

        public AddAction()
    • Method Detail

      • begin

        public void begin​(InterpretationContext ic,
                          java.lang.String name,
                          org.xml.sax.Attributes attributes)
        Description copied from class: Action
        Called when the parser encounters an element matching a Pattern.
        Specified by:
        begin in class Action
      • fetchInteger

        int fetchInteger​(InterpretationContext ic)
        Pop the Integer object at the top of the stack. This code also illustrates usage of Joran's error handling paradigm.