Class PathInput
java.lang.Object
org.springframework.shell.component.support.AbstractComponent<C>
org.springframework.shell.component.support.AbstractTextComponent<Path,PathInput.PathInputContext>
 
org.springframework.shell.component.PathInput
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware,- org.springframework.context.ResourceLoaderAware
Component for a simple path 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 SummaryConstructors
- 
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, PathInput.PathInputContext context) Read input.protected PathresolvePath(String path) Resolves aPathfrom a given rawpath.voidsetPathProvider(Function<String, Path> pathProvider) Sets a path provider.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- 
PathInputpublic PathInput(org.jline.terminal.Terminal terminal) 
- 
PathInput
- 
PathInputpublic PathInput(org.jline.terminal.Terminal terminal, String name, Function<PathInput.PathInputContext, List<org.jline.utils.AttributedString>> renderer) 
 
- 
- 
Method Details- 
getThisContextDescription copied from class:AbstractComponentGets a real component context using common this trick.- Specified by:
- getThisContextin class- AbstractComponent<PathInput.PathInputContext>
- Parameters:
- context- the context
- Returns:
- a component context
 
- 
readprotected boolean read(org.jline.keymap.BindingReader bindingReader, org.jline.keymap.KeyMap<String> keyMap, PathInput.PathInputContext context) Description copied from class:AbstractComponentRead input.- Specified by:
- readin class- AbstractComponent<PathInput.PathInputContext>
- Parameters:
- bindingReader- the binding reader
- keyMap- the key map
- context- the context
- Returns:
- true if read is complete, false to stop
 
- 
setPathProviderSets a path provider.- Parameters:
- pathProvider- the path provider
 
- 
resolvePathResolves aPathfrom a given rawpath.- Parameters:
- path- the raw path
- Returns:
- a resolved path
 
 
-