|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ptp.core.util.ArgumentParser
public class ArgumentParser
Utilitiy class for managing command line arguments.
| Constructor Summary | |
|---|---|
ArgumentParser(List<String> tokenList)
Create a command line representation from an array of strings. |
|
ArgumentParser(String commandline)
Create a command line representation from the string with a shell command line. |
|
ArgumentParser(String[] tokenArray)
Create a command line representation from an array of strings. |
|
ArgumentParser(String command,
List<String> parameterList)
Create a command line representation from the command and an list of parameters. |
|
ArgumentParser(String command,
String[] parameterArray)
Create a command line representation from the command and an array of parameters. |
|
| Method Summary | |
|---|---|
String |
getCommand()
Returns the command of the command line, assuming that the first entry is always the command. |
String |
getCommandLine(boolean fullEscape)
Convert all tokens in a full command line that can be executed in a shell. |
String |
getEscapedCommand(boolean fullEscalpe)
Returns the command of the command line, assuming that the first entry is always the command. |
String[] |
getParameterArray()
Returns a list of all arguments, assuming that the first entry is the command name. |
List<String> |
getParameterList()
Returns a list of all arguments, assuming that the first entry is the command name. |
int |
getSize()
Returns the total number of entries. |
String[] |
getTokenArray()
Returns a List of all entries of the command line. |
List<String> |
getTokenList()
Returns a List of all entries of the command line. |
String |
toString()
Returns a representation of the command line for debug purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArgumentParser(String commandline)
public ArgumentParser(String[] tokenArray)
public ArgumentParser(List<String> tokenList)
public ArgumentParser(String command,
String[] parameterArray)
public ArgumentParser(String command,
List<String> parameterList)
| Method Detail |
|---|
public String getCommandLine(boolean fullEscape)
fullEscape - If every special character shall be escaped. If false, only
white spaces are escaped and the shell will interpret the
special chars. If true, then all special chars are quoted.public String[] getTokenArray()
public List<String> getTokenList()
public String getCommand()
public String getEscapedCommand(boolean fullEscalpe)
fullEscape - If every special character shall be escaped. If false, only
white spaces are escaped and the shell will interpret the
special chars. If true, then all special chars are quoted.
public String[] getParameterArray()
public List<String> getParameterList()
public int getSize()
public String toString()
toString in class Object
|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||