public interface FileBasedJavaConverter
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
File[] |
convert(File scriptFile,
StyledDocument doc,
String className,
String packageName,
Writer wr)
Convert content of the styled document or of the specified file into Java
code and write it into the writer.
|
void |
convertFile(File scriptFile,
StyledDocument doc,
Writer wr,
String className,
String packageName,
Map<String,String> referenceMap) |
File[] convert(File scriptFile, StyledDocument doc, String className, String packageName, Writer wr) throws IOException, StopRequestException
scriptFile
- the script file. It may be null but the text
to be converted must be then provided in the doc
parameter.doc
- optional document containing the text to be converted to Java.
If this argument is not null, the converter must read the script
code from it rather than from the specified file. This mechanism is intended
to support conversion of code which has been changed in the script editor
but the updates haven't been saved to the file yet. The first file parameter
should be in such a case specified as well if it is known because it is
used to resolve eventual references to other script files through the Run
and Include commands.className
- desired Java class name. If the parameter is null, the converter
must create a default name or a name derived from the script file name.packageName
- desired Java package name.wr
- target writer to write the code to. This is just a back up target
and the converter may ignore it and write to a file instead.IOException
- when a file is not readable.StopRequestException
- when the process is canceled by user.void convertFile(File scriptFile, StyledDocument doc, Writer wr, String className, String packageName, Map<String,String> referenceMap) throws IOException
IOException