java.lang.Object
org.jline.prompt.impl.DefaultPrompt
- All Implemented Interfaces:
Prompt
- Direct Known Subclasses:
DefaultCheckboxPrompt,DefaultChoicePrompt,DefaultConfirmPrompt,DefaultEditorPrompt,DefaultInputPrompt,DefaultKeyPressPrompt,DefaultListPrompt,DefaultSearchPrompt,DefaultTextPrompt,DefaultTogglePrompt
Base implementation class for all prompt types.
This is now the native implementation that doesn't depend on console-ui.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the filter function that modifies the actual returned value.Get the message to display to the user.getName()Get the name of this prompt.Get the transformer function that modifies how the answer is displayed after submission.voidvoidsetTransformer(Function<String, String> transformer)
-
Field Details
-
name
-
message
-
-
Constructor Details
-
DefaultPrompt
-
-
Method Details
-
getName
Description copied from interface:PromptGet the name of this prompt. The name is used as the key in the result map. -
getMessage
Description copied from interface:PromptGet the message to display to the user.- Specified by:
getMessagein interfacePrompt- Returns:
- the message
-
getTransformer
Description copied from interface:PromptGet the transformer function that modifies how the answer is displayed after submission. This does not change the actual returned value. For example, a password prompt might transform the answer to "***".- Specified by:
getTransformerin interfacePrompt- Returns:
- the transformer function, or null for default display
-
getFilter
Description copied from interface:PromptGet the filter function that modifies the actual returned value. This changes the value stored in the result map. For example, trimming whitespace or converting to lowercase. -
setTransformer
-
setFilter
-