Class StringInput
java.lang.Object
org.springframework.shell.component.support.AbstractComponent<C>
org.springframework.shell.component.support.AbstractTextComponent<String,StringInput.StringInputContext>
 
org.springframework.shell.component.StringInput
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware,- org.springframework.context.ResourceLoaderAware
Component for a simple string input.
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.springframework.shell.component.support.AbstractTextComponentAbstractTextComponent.BaseTextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T, C>>, AbstractTextComponent.TextComponentContext<T, C extends AbstractTextComponent.TextComponentContext<T, C>> 
- 
Field SummaryFields inherited from class org.springframework.shell.component.support.AbstractComponentOPERATION_BACKSPACE, OPERATION_CHAR, OPERATION_DOWN, OPERATION_EXIT, OPERATION_SELECT, OPERATION_UNICODE, OPERATION_UP
- 
Constructor SummaryConstructorsConstructorDescriptionStringInput(org.jline.terminal.Terminal terminal) StringInput(org.jline.terminal.Terminal terminal, String name, String defaultValue) StringInput(org.jline.terminal.Terminal terminal, String name, String defaultValue, Function<StringInput.StringInputContext, List<org.jline.utils.AttributedString>> renderer) 
- 
Method SummaryModifier and TypeMethodDescriptiongetThisContext(ComponentContext<?> context) Gets a real component context using common this trick.protected booleanread(org.jline.keymap.BindingReader bindingReader, org.jline.keymap.KeyMap<String> keyMap, StringInput.StringInputContext context) Read input.voidsetMaskCharacter(Character maskCharacter) Sets a mask character for input and result value.Methods inherited from class org.springframework.shell.component.support.AbstractTextComponentbindKeyMap, getName, runInternalMethods inherited from class org.springframework.shell.component.support.AbstractComponentaddPostRunHandler, addPreRunHandler, getTemplateExecutor, getTerminal, hasTty, loop, render, renderTemplateResource, run, runPostRunHandlers, runPreRunHandlers, setPrintResults, setRenderer, setResourceLoader, setTemplateExecutor, setTemplateLocation
- 
Constructor Details- 
StringInputpublic StringInput(org.jline.terminal.Terminal terminal) 
- 
StringInput
- 
StringInputpublic StringInput(org.jline.terminal.Terminal terminal, String name, String defaultValue, Function<StringInput.StringInputContext, List<org.jline.utils.AttributedString>> renderer) 
 
- 
- 
Method Details- 
setMaskCharacterSets a mask character for input and result value.- Parameters:
- maskCharacter- a mask character
 
- 
getThisContextDescription copied from class:AbstractComponentGets a real component context using common this trick.- Specified by:
- getThisContextin class- AbstractComponent<StringInput.StringInputContext>
- Parameters:
- context- the context
- Returns:
- a component context
 
- 
readprotected boolean read(org.jline.keymap.BindingReader bindingReader, org.jline.keymap.KeyMap<String> keyMap, StringInput.StringInputContext context) Description copied from class:AbstractComponentRead input.- Specified by:
- readin class- AbstractComponent<StringInput.StringInputContext>
- Parameters:
- bindingReader- the binding reader
- keyMap- the key map
- context- the context
- Returns:
- true if read is complete, false to stop
 
 
-