java.lang.Cloneable
BourneShell
, CmdShell
, CommandShell
public class Shell
extends java.lang.Object
implements java.lang.Cloneable
Class that abstracts the Shell functionality, with subclases for shells that behave particularly, like
command.com
cmd.exe
Constructor | Description |
---|---|
Shell() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
clone() |
|
java.lang.String |
getExecutable() |
|
java.util.List<java.lang.String> |
getShellCommandLine(java.lang.String... arguments) |
Get the full command line to execute, including shell command, shell arguments,
executable and executable arguments
|
java.io.File |
getWorkingDirectory() |
|
protected boolean |
isDoubleQuotedArgumentEscaped() |
|
protected boolean |
isSingleQuotedArgumentEscaped() |
|
void |
setExecutable(java.lang.String executable) |
Sets the executable to run.
|
void |
setQuotedArgumentsEnabled(boolean quotedArgumentsEnabled) |
|
void |
setWorkingDirectory(java.io.File workingDirectory) |
Sets execution directory.
|
void |
setWorkingDirectory(java.lang.String path) |
Sets execution directory.
|
protected boolean isDoubleQuotedArgumentEscaped()
protected boolean isSingleQuotedArgumentEscaped()
singleQuotedArgumentEscaped
public java.util.List<java.lang.String> getShellCommandLine(java.lang.String... arguments)
arguments
- arguments for the executable, not the shellpublic void setQuotedArgumentsEnabled(boolean quotedArgumentsEnabled)
quotedArgumentsEnabled
- quotedArgumentsEnabled
public void setExecutable(java.lang.String executable)
executable
- The executable.public java.lang.String getExecutable()
public void setWorkingDirectory(java.lang.String path)
path
- The path which should be used as working directory.public void setWorkingDirectory(java.io.File workingDirectory)
workingDirectory
- The working directory.public java.io.File getWorkingDirectory()
public java.lang.Object clone()
clone
in class java.lang.Object
Copyright © 2018. All rights reserved.