org.apache.karaf.shell.console.completer
Class ArgumentCompleter
java.lang.Object
org.apache.karaf.shell.console.completer.ArgumentCompleter
- All Implemented Interfaces:
- Completer
public class ArgumentCompleter
- extends Object
- implements Completer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARGUMENTS_LIST
public static final String ARGUMENTS_LIST
- See Also:
- Constant Field Values
ArgumentCompleter
public ArgumentCompleter(org.apache.felix.service.command.CommandSession session,
AbstractCommand function,
String command)
setStrict
public void setStrict(boolean strict)
- If true, a completion at argument index N will only succeed
if all the completions from 0-(N-1) also succeed.
getStrict
public boolean getStrict()
- Returns whether a completion at argument index N will succees
if all the completions from arguments 0-(N-1) also succeed.
complete
public int complete(String buffer,
int cursor,
List<String> candidates)
- Specified by:
complete in interface Completer
verifyCompleter
protected boolean verifyCompleter(Completer completer,
String argument)
delimit
public ArgumentCompleter.ArgumentList delimit(String buffer,
int cursor)
isDelimiter
public boolean isDelimiter(String buffer,
int pos)
- Returns true if the specified character is a whitespace
parameter. Check to ensure that the character is not
escaped and returns true from
isDelimiterChar(java.lang.String, int).
- Parameters:
buffer - the complete command bufferpos - the index of the character in the buffer
- Returns:
- true if the character should be a delimiter
isEscaped
public boolean isEscaped(String buffer,
int pos)
isDelimiterChar
public boolean isDelimiterChar(String buffer,
int pos)
- The character is a delimiter if it is whitespace, and the
preceeding character is not an escape character.
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.