Class JLine2Talker

  • All Implemented Interfaces:
    Talker

    public class JLine2Talker
    extends java.lang.Object
    implements Talker
    Handles terminal interaction for Gizmo using the JLine2 library: https://github.com/jline/jline2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.StringBuilder debugLog  
    • Constructor Summary

      Constructors 
      Constructor Description
      JLine2Talker()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String exchange​(java.lang.String message)
      Send some output to the user and get some input back
      void setAutoCompletion​(java.util.List<java.lang.String> candidates)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • debugLog

        public static java.lang.StringBuilder debugLog
    • Constructor Detail

      • JLine2Talker

        public JLine2Talker()
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • exchange

        public java.lang.String exchange​(java.lang.String message)
        Send some output to the user and get some input back
        Specified by:
        exchange in interface Talker
        Parameters:
        message - output to be sent to the user
        Returns:
        the user's response
      • setAutoCompletion

        public void setAutoCompletion​(java.util.List<java.lang.String> candidates)
        Specified by:
        setAutoCompletion in interface Talker