Package com.powsybl.tools.autocompletion
Class OptionTypeMapper
java.lang.Object
com.powsybl.tools.autocompletion.OptionTypeMapper
Tries to guess option argument type, to guide autocompletion.
Works based on option name or argument name.
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at gmail.com>
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(OptionTypeMapper.Key key, OptionType optionType) addArgNameMapping
(String regex, OptionType optionType) Maps a regex on the argument name to a specific typeaddOptionNameMapping
(String regex, OptionType optionType) Maps a regex on the option name to a specific typevoid
map
(BashCommand command) void
map
(BashOption option) void
map
(List<BashCommand> commands) setDefaultType
(OptionType defaultType) Sets the type to be used as a fallback
-
Constructor Details
-
OptionTypeMapper
public OptionTypeMapper()
-
-
Method Details
-
add
-
addOptionNameMapping
Maps a regex on the option name to a specific type -
addArgNameMapping
Maps a regex on the argument name to a specific type -
setDefaultType
Sets the type to be used as a fallback -
map
-
map
-
map
-