introduce class TerminalCommandProcessor to extract code specific to processing ansi escape commands (currently mixed into AnsiOutputStream, and using override...)
.. so change class inheritance by delegation...(Design Pattern best practices).
.. so also refactor to class WindowsTerminalCommandProcessor extends TerminalCommandProcessor instead of extending both WindowsAnsiOutputStream and WindowsAnsiPrintStream
instead of
AnsiOutputStream AnsiPrintStream <=== lot of Copy&Paste
/\ /\
extends extends
| |
WindowsAnsiOutputStream WindowsAnsiPrintStream <=== also lot of Copy&Paste
refactor as
AnsiOutputStream AnsiPrintStream <==== still lot of Copy&Paste
\ / ( ... cf other PR to fix this )
uses uses
\ /
1 \/ \/ 1
TerminalCommandProcessor <--- factory --- TerminalType
/\
|
WindowsAnsiPrintStream
introduce class TerminalCommandProcessor to extract code specific to processing ansi escape commands (currently mixed into AnsiOutputStream, and using override...) .. so change class inheritance by delegation...(Design Pattern best practices). .. so also refactor to class WindowsTerminalCommandProcessor extends TerminalCommandProcessor instead of extending both WindowsAnsiOutputStream and WindowsAnsiPrintStream
instead of
refactor as