Class AbstractTerminals
java.lang.Object
net.rubygrapefruit.platform.internal.AbstractTerminals
- All Implemented Interfaces:
NativeIntegration,Terminals
- Direct Known Subclasses:
PosixTerminals,WindowsTerminals
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.rubygrapefruit.platform.terminal.Terminals
Terminals.Output -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TerminalInputprotected abstract AbstractTerminalcreateTerminal(Terminals.Output output) getTerminal(Terminals.Output output) Returns the terminal attached to the given output.Returns the terminal attached to system inputReturns a copy of this terminal access that forces terminal output to use ANSI escape sequences.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.rubygrapefruit.platform.terminal.Terminals
isTerminal, isTerminalInput
-
Constructor Details
-
AbstractTerminals
public AbstractTerminals()
-
-
Method Details
-
withAnsiOutput
Description copied from interface:TerminalsReturns a copy of this terminal access that forces terminal output to use ANSI escape sequences. This can be used to force rich terminal output when not attached to a terminal.Terminal input is not changed.
- Specified by:
withAnsiOutputin interfaceTerminals
-
getTerminal
Description copied from interface:TerminalsReturns the terminal attached to the given output.- Specified by:
getTerminalin interfaceTerminals- Returns:
- The terminal. Never returns null.
-
getTerminalInput
Description copied from interface:TerminalsReturns the terminal attached to system input- Specified by:
getTerminalInputin interfaceTerminals- Returns:
- The terminal. Never returns null.
- Throws:
NativeException- When the input is not attached to a terminal.
-
createInput
-
createTerminal
-