Class LineReaderBuilder

java.lang.Object
org.jline.reader.LineReaderBuilder

public final class LineReaderBuilder extends Object
A builder for creating and configuring LineReader instances.

This builder provides a fluent API for constructing LineReader objects with various configuration options. It simplifies the process of creating a properly configured LineReader by providing methods for setting all the necessary components and options.

Example usage:

 LineReader reader = LineReaderBuilder.builder()
     .terminal(terminal)
     .completer(completer)
     .parser(parser)
     .highlighter(highlighter)
     .variable(LineReader.HISTORY_FILE, historyFile)
     .option(LineReader.Option.AUTO_LIST, true)
     .build();
 

If no terminal is provided, the builder will attempt to create a default terminal using TerminalBuilder.terminal().

See Also: