public interface CommandLineToolLogContent
Modifier and Type | Interface and Description |
---|---|
static interface |
CommandLineToolLogContent.LineDetails |
Modifier and Type | Method and Description |
---|---|
CommandLineToolLogContent |
drop(int n)
Drops the first n lines.
|
static CommandLineToolLogContent |
empty()
Creates an empty log content.
|
String |
getAsString()
Returns the log content as a string.
|
List<String> |
getLines()
Returns this content separated into lines.
|
static CommandLineToolLogContent |
of(String content)
Creates an log content of the specified string.
|
<T> T |
parse(CommandLineToolOutputParser<T> parser)
Returns a structured representation of the log content parsed by the specified parser.
|
CommandLineToolLogContent |
visitEachLine(Consumer<CommandLineToolLogContent.LineDetails> visitor)
Visit each lines.
|
CommandLineToolLogContent |
withAnsiControlCharactersInterpreted()
Interprets a the ANSI control characters to produce plain text.
|
CommandLineToolLogContent |
withNormalizedEndOfLine()
Returns this content formatted using a new line char to separate lines.
|
static CommandLineToolLogContent of(String content)
content
- the raw content of the log contentCommandLineToolLogContent
instance representing the specified content, never null.static CommandLineToolLogContent empty()
CommandLineToolLogContent
instance, never null.<T> T parse(CommandLineToolOutputParser<T> parser)
T
- the structured representation type returned by the parserparser
- the parser to useString getAsString()
String
representation of the log content.CommandLineToolLogContent withNormalizedEndOfLine()
CommandLineToolLogContent
instance using a new line char to separate lines, never null.CommandLineToolLogContent drop(int n)
n
- the number of lines to drop from the log contentCommandLineToolLogContent
instance without the first n lines, never null.CommandLineToolLogContent withAnsiControlCharactersInterpreted()
CommandLineToolLogContent
instance with all ANSI control characters interpreted, never null.List<String> getLines()
CommandLineToolLogContent visitEachLine(Consumer<CommandLineToolLogContent.LineDetails> visitor)
CommandLineToolLogContent
instance of the result following the visit, never null.