|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.EditJTI
public class EditJTI
This class provides a utility for command-line editing of configuration (.jti) files. It is intended to be invoked from the command line, as in:
java com.sun.javatest.EditJIT options...For details of the options, use the
-help
option.
Nested Class Summary | |
---|---|
static class |
EditJTI.BadArgs
This exception is used to indicate a problem with the command line arguments. |
static class |
EditJTI.Fault
This exception is used to report problems that arise when using this API. |
Constructor Summary | |
---|---|
EditJTI()
|
Method Summary | |
---|---|
void |
edit(java.lang.String cmd)
Apply an edit to the current configuration. |
void |
edit(java.lang.String[] cmds)
Apply a series of edits to the current configuration. |
void |
load(java.io.File inFile)
Load a configuration file to be edited. |
void |
load(java.io.File inFile,
TestSuite ts)
Load a configuration file to be edited. |
void |
load(java.io.File inFile,
java.net.URLClassLoader loader)
Load a configuration file to be edited, using a specified class loader to load the interview class. |
static void |
main(java.lang.String[] args)
Command line entry point. |
boolean |
run(java.lang.String[] args)
Run the utility, without exiting. |
boolean |
run(java.lang.String[] args,
java.io.PrintWriter out)
Run the utility, without exiting, writing any messages to a specified stream. |
void |
save(java.io.File file)
Save the edited configuration in a specified file. |
void |
showPath()
Show the current question path for the configuration. |
static void |
usage(java.io.PrintStream out)
Print out brief command line help. |
void |
writeLog(java.io.File logFile)
Write a log of the questions that determine the current configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EditJTI()
Method Detail |
---|
public static void main(java.lang.String[] args)
-help
to get
brief command line help. Warning: this method uses System.exit
and so does not return if called directly.
args
- Comamnd line arguments.public static void usage(java.io.PrintStream out)
out
- the stream to which to write the command line help.public boolean run(java.lang.String[] args) throws EditJTI.BadArgs, EditJTI.Fault
args
- command line args
EditJTI.BadArgs
- if there is an error analysing the args
EditJTI.Fault
- if there is an error executing the argspublic boolean run(java.lang.String[] args, java.io.PrintWriter out) throws EditJTI.BadArgs, EditJTI.Fault
args
- command line argsout
- the stream to which to write any messages
EditJTI.BadArgs
- if there is an error analysing the args
EditJTI.Fault
- if there is an error executing the argspublic void load(java.io.File inFile) throws java.io.IOException, Interview.Fault
inFile
- the file to be loaded
java.io.IOException
- if there is a problem reading the file
Interview.Fault
- if there is a problem loading the interview data from the filepublic void load(java.io.File inFile, TestSuite ts) throws java.io.IOException, Interview.Fault, EditJTI.Fault
inFile
- the file to be loadedts
- the test suite for which the interview is to be loaded
java.io.IOException
- if there is a problem reading the file
Interview.Fault
- if there is a problem loading the interview data from the file
EditJTI.Fault
- if there is a problem creating the interview for the testsuitepublic void load(java.io.File inFile, java.net.URLClassLoader loader) throws java.io.IOException, Interview.Fault, EditJTI.Fault
inFile
- the file to be loadedloader
- the class loader to be used to load the interview class
java.io.IOException
- if there is a problem reading the file
Interview.Fault
- if there is a problem loading the interview data from the file
EditJTI.Fault
- if there is a problem creating the interview for the testsuitepublic void save(java.io.File file) throws java.io.IOException, Interview.Fault
file
- The file in which to save the configuration
java.io.IOException
- if there is a problem while writing the file
Interview.Fault
- if there is a problem while saving the interview datapublic void showPath()
public void writeLog(java.io.File logFile) throws java.io.IOException
logFile
- the file to which to write the log
java.io.IOException
- if there is a problem while writing the log filepublic void edit(java.lang.String[] cmds) throws EditJTI.Fault
cmds
- the editing commands to be applied
EditJTI.Fault
- if there is a problem while applying the edit commands.edit(String)
public void edit(java.lang.String cmd) throws EditJTI.Fault
cmd
- the editing command to be applied
Currently, two forms of command are supported: EditJTI.Fault
- if there is a problem while applying the edit commands.edit(String[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |