Class InterpreterPipe<T>

Type Parameters:
T - The type returned by all members of the pipe
All Implemented Interfaces:<T>,<T>

class InterpreterPipe<T> extends Object implements<T>
Pairs XMLElement.Interpreter instances.
  • Constructor Details

    • InterpreterPipe

  • Method Details

    • newPipe

      public static <T> InterpreterPipe<T> newPipe(<T>... pipes)
    • add

      public void add(<T> i)
    • interpretElement

      public T interpretElement( elem) throws UnableToCompleteException
      Interpreters are fired in the order they were handed to the constructor. If an interpreter gives a non-null result, downstream interpreters don't fire.
      Specified by:
      interpretElement in interface<T>
      The T or null returned by the last pipelined interpreter to run
      UnableToCompleteException - on error
    • postProcess

      public String postProcess(String consumedText) throws UnableToCompleteException
      Called by various XMLElement consumeInner*() methods after all elements have been handed to interpretElement( Passes the text to be post processed to each pipe member that is instanceof XMLElement.PostProcessingInterpreter.
      Specified by:
      postProcess in interface<T>