org.nuxeo.ecm.shell
Class CommandLine
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Token>
org.nuxeo.ecm.shell.CommandLine
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<Token>, Collection<Token>, List<Token>, RandomAccess
public class CommandLine
- extends ArrayList<Token>
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
CommandLine
public CommandLine(CommandLineService service)
getCommand
public String getCommand()
addCommand
public Token addCommand(String command)
setCommand
public Token setCommand(String command)
isInteractive
public boolean isInteractive()
addOption
public Token addOption(String name)
- Adds a new option as parsed from the command line.
This should be called by preserving the order as in raw command line. The
order is useful for auto-completion
- Parameters:
name
-
addOptionValue
public Token addOptionValue(String name,
String value)
- Adds a new token was parsed.
addParameter
public Token addParameter(String str)
- Adds a new Parameter token.
getToken
public Token getToken(int offset)
isOptionSet
public boolean isOptionSet(String name)
getOption
public String getOption(String name)
getParameters
public String[] getParameters()
toString
public String toString()
- Overrides:
toString
in class AbstractCollection<Token>
Copyright © 2011 Nuxeo SAS. All Rights Reserved.