|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crsh.cmdline.EnumCompleter
public class EnumCompleter
A completer for enums.
Constructor Summary | |
---|---|
EnumCompleter()
|
Method Summary | |
---|---|
Map<String,Boolean> |
complete(ParameterDescriptor<?> parameter,
String prefix)
Query the completer for a set of completion for the given prefix. |
static EnumCompleter |
getInstance()
Returns the empty completer instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumCompleter()
Method Detail |
---|
public static EnumCompleter getInstance()
public Map<String,Boolean> complete(ParameterDescriptor<?> parameter, String prefix) throws Exception
Completer
Query the completer for a set of completion for the given prefix. The returned Map should provide the possible suffixes matching the prefix argument. Each map entry maps to a possible completion: an entry key is the possible completion, its corresponding boolean value indicates wether the value can be further more completed or not. The following guidelines should be respected:
Example: a completer that would complete colors could
Example: a completer that would complete java packages could
complete
in interface Completer
parameter
- the completed parameterprefix
- the prefix to complete
Exception
- any exception that would prevent completion to perform correctly
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |