Class Launcher
java.lang.Object
com.ibm.wala.util.processes.Launcher
- Direct Known Subclasses:
BasicLauncher, JavaLauncher
Abstract base class for a process launcher
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA thread that runs in a loop, performing the drain() action until a process terminates -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Launcher.Drainerprotected Launcher.Drainerprotected Threadprotected ThreadgetEnv()@Nullable byte[]getInput()@Nullable byte[]@Nullable byte[]@Nullable FilebooleanbooleanvoidvoidsetInput(byte[] input) Set input which will be fed to the launched process's stdinprotected voidsetStdErr(byte[] newErr) protected voidsetStdOut(byte[] newOutput) voidsetWorkingDir(File newWorkingDir) protected ProcessspawnProcess(@Nullable String cmd) Spawn a process to execute the given commandprotected ProcessspawnProcess(String[] cmd) Spawn a process to execute the given commandtoString()
-
Field Details
-
workingDir
-
env
-
stdOut
protected byte @Nullable [] stdOut -
stdErr
protected byte @Nullable [] stdErr
-
-
Constructor Details
-
Launcher
-
Launcher
-
-
Method Details
-
getWorkingDir
-
setWorkingDir
-
getEnv
-
setEnv
-
toString
-
spawnProcess
Spawn a process to execute the given command- Returns:
- an object representing the process
- Throws:
IllegalArgumentExceptionIOException
-
spawnProcess
Spawn a process to execute the given command- Returns:
- an object representing the process
- Throws:
IllegalArgumentExceptionIOException
-
drainStdOut
-
captureStdOut
-
drainStdErr
-
captureStdErr
-
isCaptureOutput
public boolean isCaptureOutput() -
isCaptureErr
public boolean isCaptureErr() -
getStdOut
@NullUnmarked public @Nullable byte[] getStdOut() -
getStderr
@NullUnmarked public @Nullable byte[] getStderr() -
setStdOut
protected void setStdOut(byte[] newOutput) -
setStdErr
protected void setStdErr(byte[] newErr) -
getInput
@NullUnmarked public @Nullable byte[] getInput() -
setInput
public void setInput(byte[] input) Set input which will be fed to the launched process's stdin
-