Package com.sun.javatest
Class Command
java.lang.Object
com.sun.javatest.Command
- Direct Known Subclasses:
ExecStdTestSameJVMCmd
,JavaCompileCommand
,ProcessCommand
Command provides the ability to invoke arbitrary Java
code from within a Script. Standard implementations may exist to compile
or execute tests, in the same JVM as the harness or its agent,
in separate processes, or even on a separate machine.
Custom implementations can also be used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the class loader to be used if this command needs to dynamically load additional classes.abstract Status
run
(String[] args, PrintWriter out1, PrintWriter out2) The method that that does the work of the command.void
Set a class loader that to be used if this command needs to dynamically load additional classes.
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
run
The method that that does the work of the command.- Parameters:
args
- Command-specific options and argumentsout1
- A stream to which to report messages and errors. This stream was previously called "log".out2
- An additional stream to which to write output. This stream was previously called "ref".- Returns:
- The result of the command
-
getClassLoader
Get the class loader to be used if this command needs to dynamically load additional classes.- Returns:
- the class loader to be used
- See Also:
-
setClassLoader
Set a class loader that to be used if this command needs to dynamically load additional classes.- Parameters:
cl
- the class loader to be used- See Also:
-