Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest
Class Command

    java.lang.Object
      com.sun.javatest.Command

Direct Known Subclasses:
  ExecStdTestSameJVMCmd, JavaCompileCommand, ProcessCommand

    public abstract class Command

extends java.lang.Object

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
`Command()`

Method Summary
`java.lang.ClassLoader` | `getClassLoader()` Get the class loader to be used if this command needs to dynamically load additional classes.
`abstract Status` | `run(java.lang.String[] args, java.io.PrintWriter out1, java.io.PrintWriter out2)` The method that that does the work of the command.
`void` | `setClassLoader(java.lang.ClassLoader cl)` Set a class loader that to be used if this command needs to dynamically load additional classes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Command

    public Command()

Method Detail

### run

    public abstract Status run(java.lang.String[] args,
                               java.io.PrintWriter out1,
                               java.io.PrintWriter out2)

  The method that that does the work of the command.

  Parameters:
    `args` - Command-specific options and arguments
    `out1` - 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

### setClassLoader

    public void setClassLoader(java.lang.ClassLoader cl)

  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:
    `getClassLoader()`

### getClassLoader

    public java.lang.ClassLoader 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(java.lang.ClassLoader)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.