|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.externaltools.ExternalTool
public final class ExternalTool
Describes an external program and its required arguments. On Mac OS X, automatically resolves commands that are application bundles to the correct executable program.
The argument strings given to the constructors should contain some
substitution strings, like "%1", "%2", etc. Derived classes declare which
substitutions are forbidden and required for their kind of tool. No
validation is done during construction. See ExternalToolValidator
.
The command and argument strings are always compared case-sensitive (for
equals(Object)
, etc.) even if the current platform doesn't work that
way.
ExternalToolValidator
,
WindowsStyleArgumentTokenizer
Constructor Summary | |
---|---|
ExternalTool(java.lang.String commandAndArguments)
Creates an external tool that runs the given command with the given arguments. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.String[] |
getArguments()
Gets the arguments as individual strings, unquoted and unescaped from the original arguments given during construction. |
java.lang.String |
getCommand()
Gets the command (executable) portion of the external command. |
java.lang.String |
getOriginalCommand()
Gets the command (executable) portion of the external command. |
java.lang.String |
getOriginalCommandAndArguments()
Gets the original command and arguments string, before they were tokenized and unquoted. |
int |
hashCode()
|
static ExternalTool |
loadFromMemento(Memento memento)
Loads tool state from the given Memento , which can have any name. |
void |
saveToMemento(Memento memento)
Saves this tool's state to the given Memento , which should have a
name (of the caller's choice) but no other data. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExternalTool(java.lang.String commandAndArguments) throws ExternalToolException
WindowsStyleArgumentTokenizer
). The
command is the first token parsed, and every other token is a new
argument.
commandAndArguments
- a string containing the command that runs this external tool and
all its arguments (with special substitutions ("%1", etc.)
embedded) (must not be null
or empty)
ExternalToolException
- if the arguments could not be tokenized (for example, invalid
quoting)Method Detail |
---|
public final java.lang.String getOriginalCommand()
public final java.lang.String getCommand()
public final java.lang.String[] getArguments()
public final java.lang.String getOriginalCommandAndArguments()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void saveToMemento(Memento memento)
Memento
, which should have a
name (of the caller's choice) but no other data.
memento
- the Memento
to save this tool's state to (must not be
null
)public static ExternalTool loadFromMemento(Memento memento)
Memento
, which can have any name.
memento
- the Memento
to load state from (must not be
null
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |