Interface TerminalExt

All Superinterfaces:
AutoCloseable, Closeable, Flushable, Terminal
All Known Implementing Classes:
AbstractPosixTerminal, AbstractTerminal, AbstractWindowsTerminal, DumbTerminal, ExternalTerminal, JansiWinSysTerminal, JnaWinSysTerminal, LineDisciplineTerminal, NativeWinSysTerminal, PosixPtyTerminal, PosixSysTerminal

public interface TerminalExt extends Terminal
Extended Terminal interface that provides access to internal implementation details.

The TerminalExt interface extends the standard Terminal interface with additional methods that provide access to the terminal's internal implementation details. These methods are primarily used by terminal providers and other internal components of the JLine library.

Terminal implementations typically implement this interface to expose information about their creation and configuration, such as the provider that created them and the system stream they are associated with.

Application code should generally use the standard Terminal interface rather than this extended interface, unless specific access to these internal details is required.

See Also:
  • Method Details

    • getProvider

      TerminalProvider getProvider()
      Returns the terminal provider that created this terminal.

      The terminal provider is responsible for creating and managing terminal instances on a specific platform. This method allows access to the provider that created this terminal, which can be useful for accessing provider-specific functionality or for creating additional terminals with the same provider.

      Returns:
      the TerminalProvider that created this terminal, or null if the terminal was created with no provider
      See Also:
    • getSystemStream

      SystemStream getSystemStream()
      Returns the system stream associated with this terminal, if any.

      This method indicates whether the terminal is bound to a standard system stream (standard input, standard output, or standard error). Terminals that are connected to system streams typically represent the actual terminal window or console that the application is running in.

      Returns:
      the underlying system stream, which may be SystemStream.Input, SystemStream.Output, SystemStream.Error, or null if this terminal is not bound to a system stream
      See Also: