Interface GroovyshOptions.ResultHandler

Enclosing class:
GroovyshOptions
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface GroovyshOptions.ResultHandler
Handles a value produced by the REPL loop.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(org.jline.console.Printer printer, Object result)
    Renders result after a line has been executed.
  • Method Details

    • handle

      void handle(org.jline.console.Printer printer, Object result) throws Exception
      Renders result after a line has been executed.
      Parameters:
      printer - the printer used by the session
      result - the value returned by the command dispatch, which may be null
      Throws:
      Exception - if rendering fails; groovysh then routes it to the error handler