FileDocCategorySizeDatePackage
NetRexxC.javaAPI DocApache Ant 1.7035201Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional

NetRexxC

public class NetRexxC extends org.apache.tools.ant.taskdefs.MatchingTask
Compiles NetRexx source files. This task can take the following arguments:
  • binary
  • classpath
  • comments
  • compile
  • console
  • crossref
  • decimal
  • destdir
  • diag
  • explicit
  • format
  • keep
  • logo
  • replace
  • savelog
  • srcdir
  • sourcedir
  • strictargs
  • strictassign
  • strictcase
  • strictimport
  • symbols
  • time
  • trace
  • utf8
  • verbose
  • suppressMethodArgumentNotUsed
  • suppressPrivatePropertyNotUsed
  • suppressVariableNotUsed
  • suppressExceptionNotSignalled
  • suppressDeprecation
Of these arguments, the srcdir argument is required.

When this task executes, it will recursively scan the srcdir looking for NetRexx source files to compile. This task makes its compile decision based on timestamp.

Before files are compiled they and any other file in the srcdir will be copied to the destdir allowing support files to be located properly in the classpath. The reason for copying the source files before the compile is that NetRexxC has only two destinations for classfiles:

  1. The current directory, and,
  2. The directory the source is in (see sourcedir option)

Fields Summary
private boolean
binary
private String
classpath
private boolean
comments
private boolean
compact
private boolean
compile
private boolean
console
private boolean
crossref
private boolean
decimal
private File
destDir
private boolean
diag
private boolean
explicit
private boolean
format
private boolean
keep
private boolean
logo
private boolean
replace
private boolean
savelog
private File
srcDir
private boolean
sourcedir
private boolean
strictargs
private boolean
strictassign
private boolean
strictcase
private boolean
strictimport
private boolean
strictprops
private boolean
strictsignal
private boolean
symbols
private boolean
time
private String
trace
private boolean
utf8
private String
verbose
private boolean
suppressMethodArgumentNotUsed
private boolean
suppressPrivatePropertyNotUsed
private boolean
suppressVariableNotUsed
private boolean
suppressExceptionNotSignalled
private boolean
suppressDeprecation
static final String
MSG_METHOD_ARGUMENT_NOT_USED
static final String
MSG_PRIVATE_PROPERTY_NOT_USED
static final String
MSG_VARIABLE_NOT_USED
static final String
MSG_EXCEPTION_NOT_SIGNALLED
static final String
MSG_DEPRECATION
private Vector
compileList
private Hashtable
filecopyList
Constructors Summary
Methods Summary
private voidaddExistingToClasspath(java.lang.StringBuffer target, java.lang.String source)
Takes a classpath-like string, and adds each element of this string to a new classpath, if the components exist. Components that don't exist, aren't added. We do this, because jikes issues warnings for non-existant files/dirs in his classpath, and these warnings are pretty annoying.

param
target - target classpath
param
source - source classpath to get file objects.

        StringTokenizer tok = new StringTokenizer(source,
            System.getProperty("path.separator"), false);

        while (tok.hasMoreTokens()) {
            File f = getProject().resolveFile(tok.nextToken());

            if (f.exists()) {
                target.append(File.pathSeparator);
                target.append(f.getAbsolutePath());
            } else {
                log("Dropping from classpath: "
                    + f.getAbsolutePath(), Project.MSG_VERBOSE);
            }
        }

    
private voidcopyFilesToDestination()
Copy eligible files from the srcDir to destDir

        if (filecopyList.size() > 0) {
            log("Copying " + filecopyList.size() + " file"
                 + (filecopyList.size() == 1 ? "" : "s")
                 + " to " + destDir.getAbsolutePath());

            Enumeration e = filecopyList.keys();

            while (e.hasMoreElements()) {
                String fromFile = (String) e.nextElement();
                String toFile = (String) filecopyList.get(fromFile);

                try {
                    FileUtils.getFileUtils().copyFile(fromFile, toFile);
                } catch (IOException ioe) {
                    String msg = "Failed to copy " + fromFile + " to " + toFile
                         + " due to " + ioe.getMessage();

                    throw new BuildException(msg, ioe);
                }
            }
        }
    
private voiddoNetRexxCompile()
Performs a compile using the NetRexx 1.1.x compiler

        log("Using NetRexx compiler", Project.MSG_VERBOSE);

        String classpath = getCompileClasspath();
        StringBuffer compileOptions = new StringBuffer();

        // create an array of strings for input to the compiler: one array
        // comes from the compile options, the other from the compileList
        String[] compileOptionsArray = getCompileOptionsAsArray();
        String[] fileListArray = new String[compileList.size()];
        Enumeration e = compileList.elements();
        int j = 0;

        while (e.hasMoreElements()) {
            fileListArray[j] = (String) e.nextElement();
            j++;
        }
        // create a single array of arguments for the compiler
        String[] compileArgs = new String[compileOptionsArray.length + fileListArray.length];

        for (int i = 0; i < compileOptionsArray.length; i++) {
            compileArgs[i] = compileOptionsArray[i];
        }
        for (int i = 0; i < fileListArray.length; i++) {
            compileArgs[i + compileOptionsArray.length] = fileListArray[i];
        }

        // print nice output about what we are doing for the log
        compileOptions.append("Compilation args: ");
        for (int i = 0; i < compileOptionsArray.length; i++) {
            compileOptions.append(compileOptionsArray[i]);
            compileOptions.append(" ");
        }
        log(compileOptions.toString(), Project.MSG_VERBOSE);

        String eol = System.getProperty("line.separator");
        StringBuffer niceSourceList = new StringBuffer("Files to be compiled:" + eol);

        for (int i = 0; i < compileList.size(); i++) {
            niceSourceList.append("    ");
            niceSourceList.append(compileList.elementAt(i).toString());
            niceSourceList.append(eol);
        }

        log(niceSourceList.toString(), Project.MSG_VERBOSE);

        // need to set java.class.path property and restore it later
        // since the NetRexx compiler has no option for the classpath
        String currentClassPath = System.getProperty("java.class.path");
        Properties currentProperties = System.getProperties();

        currentProperties.put("java.class.path", classpath);

        try {
            StringWriter out = new StringWriter();
            int rc =
                COM.ibm.netrexx.process.NetRexxC.main(new Rexx(compileArgs), new PrintWriter(out));
            String sdir = srcDir.getAbsolutePath();
            String ddir = destDir.getAbsolutePath();
            boolean doReplace = !(sdir.equals(ddir));
            int dlen = ddir.length();
            String l;
            BufferedReader in = new BufferedReader(new StringReader(out.toString()));

            log("replacing destdir '" + ddir + "' through sourcedir '"
                + sdir + "'", Project.MSG_VERBOSE);
            while ((l = in.readLine()) != null) {
                int idx;

                while (doReplace && ((idx = l.indexOf(ddir)) != -1)) {
                    // path is mentioned in the message
                    l = (new StringBuffer(l)).replace(idx, idx + dlen, sdir).toString();
                }
                // verbose level logging for suppressed messages
                if (suppressMethodArgumentNotUsed
                    && l.indexOf(MSG_METHOD_ARGUMENT_NOT_USED) != -1) {
                    log(l, Project.MSG_VERBOSE);
                } else if (suppressPrivatePropertyNotUsed
                    && l.indexOf(MSG_PRIVATE_PROPERTY_NOT_USED) != -1) {
                    log(l, Project.MSG_VERBOSE);
                } else if (suppressVariableNotUsed
                    && l.indexOf(MSG_VARIABLE_NOT_USED) != -1) {
                    log(l, Project.MSG_VERBOSE);
                } else if (suppressExceptionNotSignalled
                    && l.indexOf(MSG_EXCEPTION_NOT_SIGNALLED) != -1) {
                    log(l, Project.MSG_VERBOSE);
                } else if (suppressDeprecation
                    && l.indexOf(MSG_DEPRECATION) != -1) {
                    log(l, Project.MSG_VERBOSE);
                } else if (l.indexOf("Error:") != -1) {
                    // error level logging for compiler errors
                    log(l, Project.MSG_ERR);
                } else if (l.indexOf("Warning:") != -1) {
                    // warning for all warning messages
                    log(l, Project.MSG_WARN);
                } else {
                    log(l, Project.MSG_INFO); // info level for the rest.
                }
            }
            if (rc > 1) {
                throw new BuildException("Compile failed, messages should "
                    + "have been provided.");
            }
        } catch (IOException ioe) {
            throw new BuildException("Unexpected IOException while "
                + "playing with Strings", ioe);
        } finally {
            // need to reset java.class.path property
            // since the NetRexx compiler has no option for the classpath
            currentProperties = System.getProperties();
            currentProperties.put("java.class.path", currentClassPath);
        }

    
public voidexecute()
Executes the task - performs the actual compiler call.

throws
BuildException on error.


        // first off, make sure that we've got a srcdir and destdir
        if (srcDir == null || destDir == null) {
            throw new BuildException("srcDir and destDir attributes must be set!");
        }

        // scan source and dest dirs to build up both copy lists and
        // compile lists
        //        scanDir(srcDir, destDir);
        DirectoryScanner ds = getDirectoryScanner(srcDir);

        String[] files = ds.getIncludedFiles();

        scanDir(srcDir, destDir, files);

        // copy the source and support files
        copyFilesToDestination();

        // compile the source files
        if (compileList.size() > 0) {
            log("Compiling " + compileList.size() + " source file"
                 + (compileList.size() == 1 ? "" : "s")
                 + " to " + destDir);
            doNetRexxCompile();
        }
    
private java.lang.StringgetCompileClasspath()
Builds the compilation classpath.

        StringBuffer classpath = new StringBuffer();

        // add dest dir to classpath so that previously compiled and
        // untouched classes are on classpath
        classpath.append(destDir.getAbsolutePath());

        // add our classpath to the mix
        if (this.classpath != null) {
            addExistingToClasspath(classpath, this.classpath);
        }

        // add the system classpath
        // addExistingToClasspath(classpath,System.getProperty("java.class.path"));
        return classpath.toString();
    
private java.lang.String[]getCompileOptionsAsArray()
This

        Vector options = new Vector();

        options.addElement(binary ? "-binary" : "-nobinary");
        options.addElement(comments ? "-comments" : "-nocomments");
        options.addElement(compile ? "-compile" : "-nocompile");
        options.addElement(compact ? "-compact" : "-nocompact");
        options.addElement(console ? "-console" : "-noconsole");
        options.addElement(crossref ? "-crossref" : "-nocrossref");
        options.addElement(decimal ? "-decimal" : "-nodecimal");
        options.addElement(diag ? "-diag" : "-nodiag");
        options.addElement(explicit ? "-explicit" : "-noexplicit");
        options.addElement(format ? "-format" : "-noformat");
        options.addElement(keep ? "-keep" : "-nokeep");
        options.addElement(logo ? "-logo" : "-nologo");
        options.addElement(replace ? "-replace" : "-noreplace");
        options.addElement(savelog ? "-savelog" : "-nosavelog");
        options.addElement(sourcedir ? "-sourcedir" : "-nosourcedir");
        options.addElement(strictargs ? "-strictargs" : "-nostrictargs");
        options.addElement(strictassign ? "-strictassign" : "-nostrictassign");
        options.addElement(strictcase ? "-strictcase" : "-nostrictcase");
        options.addElement(strictimport ? "-strictimport" : "-nostrictimport");
        options.addElement(strictprops ? "-strictprops" : "-nostrictprops");
        options.addElement(strictsignal ? "-strictsignal" : "-nostrictsignal");
        options.addElement(symbols ? "-symbols" : "-nosymbols");
        options.addElement(time ? "-time" : "-notime");
        options.addElement("-" + trace);
        options.addElement(utf8 ? "-utf8" : "-noutf8");
        options.addElement("-" + verbose);

        String[] results = new String[options.size()];

        options.copyInto(results);
        return results;
    
public voidinit()
init-Method sets defaults from Properties. That way, when ant is called with arguments like -Dant.netrexxc.verbose=verbose5 one can easily take control of all netrexxc-tasks.

        String p;

        if ((p = getProject().getProperty("ant.netrexxc.binary")) != null) {
            this.binary = Project.toBoolean(p);
        }
        // classpath makes no sense
        if ((p = getProject().getProperty("ant.netrexxc.comments")) != null) {
            this.comments = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.compact")) != null) {
            this.compact = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.compile")) != null) {
            this.compile = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.console")) != null) {
            this.console = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null) {
            this.crossref = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null) {
            this.decimal = Project.toBoolean(p);
            // destDir
        }
        if ((p = getProject().getProperty("ant.netrexxc.diag")) != null) {
            this.diag = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.explicit")) != null) {
            this.explicit = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.format")) != null) {
            this.format = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.keep")) != null) {
            this.keep = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.logo")) != null) {
            this.logo = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.replace")) != null) {
            this.replace = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.savelog")) != null) {
            this.savelog = Project.toBoolean(p);
            // srcDir
        }
        if ((p = getProject().getProperty("ant.netrexxc.sourcedir")) != null) {
            this.sourcedir = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null) {
            this.strictargs = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null) {
            this.strictassign = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null) {
            this.strictcase = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null) {
            this.strictimport = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null) {
            this.strictprops = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null) {
            this.strictsignal = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null) {
            this.symbols = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.time")) != null) {
            this.time = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.trace")) != null) {
            setTrace(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.utf8")) != null) {
            this.utf8 = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.verbose")) != null) {
            setVerbose(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.suppressMethodArgumentNotUsed")) != null) {
            this.suppressMethodArgumentNotUsed = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.suppressPrivatePropertyNotUsed")) != null) {
            this.suppressPrivatePropertyNotUsed = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.suppressVariableNotUsed")) != null) {
            this.suppressVariableNotUsed = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.suppressExceptionNotSignalled")) != null) {
            this.suppressExceptionNotSignalled = Project.toBoolean(p);
        }
        if ((p = getProject().getProperty("ant.netrexxc.suppressDeprecation")) != null) {
            this.suppressDeprecation = Project.toBoolean(p);
        }
    
private voidscanDir(java.io.File srcDir, java.io.File destDir, java.lang.String[] files)
Scans the directory looking for source files to be compiled and support files to be copied.

        for (int i = 0; i < files.length; i++) {
            File srcFile = new File(srcDir, files[i]);
            File destFile = new File(destDir, files[i]);
            String filename = files[i];
            // if it's a non source file, copy it if a later date than the
            // dest
            // if it's a source file, see if the destination class file
            // needs to be recreated via compilation
            if (filename.toLowerCase().endsWith(".nrx")) {
                File classFile =
                    new File(destDir,
                    filename.substring(0, filename.lastIndexOf('.")) + ".class");

                if (!compile || srcFile.lastModified() > classFile.lastModified()) {
                    filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath());
                    compileList.addElement(destFile.getAbsolutePath());
                }
            } else {
                if (srcFile.lastModified() > destFile.lastModified()) {
                    filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath());
                }
            }
        }
    
public voidsetBinary(boolean binary)
Set whether literals are treated as binary, rather than NetRexx types.

param
binary a boolean value.


                         
        
        this.binary = binary;
    
public voidsetClasspath(java.lang.String classpath)
Set the classpath used for NetRexx compilation.

param
classpath the classpath to use.

        this.classpath = classpath;
    
public voidsetComments(boolean comments)
Set whether comments are passed through to the generated java source. Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false

param
comments a boolean value.

        this.comments = comments;
    
public voidsetCompact(boolean compact)
Set whether error messages come out in compact or verbose format. Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false

param
compact a boolean value.

        this.compact = compact;
    
public voidsetCompile(boolean compile)
Set whether the NetRexx compiler should compile the generated java code Valid true values are "on" or "true". Anything else sets the flag to false. The default value is true. Setting this flag to false, will automatically set the keep flag to true.

param
compile a boolean value.

        this.compile = compile;
        if (!this.compile && !this.keep) {
            this.keep = true;
        }
    
public voidsetConsole(boolean console)
Set whether or not messages should be displayed on the 'console' Valid true values are "on" or "true". Anything else sets the flag to false. The default value is true.

param
console a boolean value.

        this.console = console;
    
public voidsetCrossref(boolean crossref)
Whether variable cross references are generated.

param
crossref a boolean value.

        this.crossref = crossref;
    
public voidsetDecimal(boolean decimal)
Set whether decimal arithmetic should be used for the netrexx code. Binary arithmetic is used when this flag is turned off. Valid true values are "on" or "true". Anything else sets the flag to false. The default value is true.

param
decimal a boolean value.

        this.decimal = decimal;
    
public voidsetDestDir(java.io.File destDirName)
Set the destination directory into which the NetRexx source files should be copied and then compiled.

param
destDirName the destination directory.

        destDir = destDirName;
    
public voidsetDiag(boolean diag)
Whether diagnostic information about the compile is generated

param
diag a boolean value.

        this.diag = diag;
    
public voidsetExplicit(boolean explicit)
Sets whether variables must be declared explicitly before use. Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
explicit a boolean value.

        this.explicit = explicit;
    
public voidsetFormat(boolean format)
Whether the generated java code is formatted nicely or left to match NetRexx line numbers for call stack debugging.

param
format a boolean value.

        this.format = format;
    
public voidsetJava(boolean java)
Whether the generated java code is produced Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
java a boolean value.

        log("The attribute java is currently unused.", Project.MSG_WARN);
    
public voidsetKeep(boolean keep)
Sets whether the generated java source file should be kept after compilation. The generated files will have an extension of .java.keep, not .java Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
keep a boolean value.

        this.keep = keep;
    
public voidsetLogo(boolean logo)
Whether the compiler text logo is displayed when compiling.

param
logo a boolean value.

        this.logo = logo;
    
public voidsetReplace(boolean replace)
Whether the generated .java file should be replaced when compiling Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
replace a boolean value.

        this.replace = replace;
    
public voidsetSavelog(boolean savelog)
Sets whether the compiler messages will be written to NetRexxC.log as well as to the console Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
savelog a boolean value.

        this.savelog = savelog;
    
public voidsetSourcedir(boolean sourcedir)
Tells the NetRexx compiler to store the class files in the same directory as the source files. The alternative is the working directory Valid true values are "on" or "true". Anything else sets the flag to false. The default value is true.

param
sourcedir a boolean value.

        this.sourcedir = sourcedir;
    
public voidsetSrcDir(java.io.File srcDirName)
Set the source dir to find the source Java files.

param
srcDirName the source directory.

        srcDir = srcDirName;
    
public voidsetStrictargs(boolean strictargs)
Tells the NetRexx compiler that method calls always need parentheses, even if no arguments are needed, e.g. aStringVar.getBytes vs. aStringVar.getBytes() Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
strictargs a boolean value.

        this.strictargs = strictargs;
    
public voidsetStrictassign(boolean strictassign)
Tells the NetRexx compile that assignments must match exactly on type.

param
strictassign a boolean value.

        this.strictassign = strictassign;
    
public voidsetStrictcase(boolean strictcase)
Specifies whether the NetRexx compiler should be case sensitive or not.

param
strictcase a boolean value.

        this.strictcase = strictcase;
    
public voidsetStrictimport(boolean strictimport)
Sets whether classes need to be imported explicitly using an import statement. By default the NetRexx compiler will import certain packages automatically Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
strictimport a boolean value.

        this.strictimport = strictimport;
    
public voidsetStrictprops(boolean strictprops)
Sets whether local properties need to be qualified explicitly using this Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
strictprops a boolean value.

        this.strictprops = strictprops;
    
public voidsetStrictsignal(boolean strictsignal)
Whether the compiler should force catching of exceptions by explicitly named types.

param
strictsignal a boolean value.

        this.strictsignal = strictsignal;
    
public voidsetSuppressDeprecation(boolean suppressDeprecation)
Tells whether we should filter out any deprecation-messages of the compiler out.

param
suppressDeprecation a boolean value.

        this.suppressDeprecation = suppressDeprecation;
    
public voidsetSuppressExceptionNotSignalled(boolean suppressExceptionNotSignalled)
Whether the task should suppress the "FooException is in SIGNALS list but is not signalled within the method", which is sometimes rather useless. The warning is logged as verbose message, though.

param
suppressExceptionNotSignalled a boolean value.

        this.suppressExceptionNotSignalled = suppressExceptionNotSignalled;
    
public voidsetSuppressMethodArgumentNotUsed(boolean suppressMethodArgumentNotUsed)
Whether the task should suppress the "Method argument is not used" in strictargs-Mode, which can not be suppressed by the compiler itself. The warning is logged as verbose message, though.

param
suppressMethodArgumentNotUsed a boolean value.

        this.suppressMethodArgumentNotUsed = suppressMethodArgumentNotUsed;
    
public voidsetSuppressPrivatePropertyNotUsed(boolean suppressPrivatePropertyNotUsed)
Whether the task should suppress the "Private property is defined but not used" in strictargs-Mode, which can be quite annoying while developing. The warning is logged as verbose message, though.

param
suppressPrivatePropertyNotUsed a boolean value.

        this.suppressPrivatePropertyNotUsed = suppressPrivatePropertyNotUsed;
    
public voidsetSuppressVariableNotUsed(boolean suppressVariableNotUsed)
Whether the task should suppress the "Variable is set but not used" in strictargs-Mode. Be careful with this one! The warning is logged as verbose message, though.

param
suppressVariableNotUsed a boolean value.

        this.suppressVariableNotUsed = suppressVariableNotUsed;
    
public voidsetSymbols(boolean symbols)
Sets whether debug symbols should be generated into the class file Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
symbols a boolean value.

        this.symbols = symbols;
    
public voidsetTime(boolean time)
Asks the NetRexx compiler to print compilation times to the console Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
time a boolean value.

        this.time = time;
    
public voidsetTrace(org.apache.tools.ant.taskdefs.optional.NetRexxC$TraceAttr trace)
Turns on or off tracing and directs the resultant trace output Valid values are: "trace", "trace1", "trace2" and "notrace". "trace" and "trace2".

param
trace the value to set.

        this.trace = trace.getValue();
    
public voidsetTrace(java.lang.String trace)
Turns on or off tracing and directs the resultant trace output Valid values are: "trace", "trace1", "trace2" and "notrace". "trace" and "trace2".

param
trace the value to set.

        TraceAttr t = new TraceAttr();

        t.setValue(trace);
        setTrace(t);
    
public voidsetUtf8(boolean utf8)
Tells the NetRexx compiler that the source is in UTF8 Valid true values are "on" or "true". Anything else sets the flag to false. The default value is false.

param
utf8 a boolean value.

        this.utf8 = utf8;
    
public voidsetVerbose(org.apache.tools.ant.taskdefs.optional.NetRexxC$VerboseAttr verbose)
Whether lots of warnings and error messages should be generated

param
verbose the value to set - verbose<level> or noverbose.

        this.verbose = verbose.getValue();
    
public voidsetVerbose(java.lang.String verbose)
Whether lots of warnings and error messages should be generated

param
verbose the value to set - verbose<level> or noverbose.

        VerboseAttr v = new VerboseAttr();

        v.setValue(verbose);
        setVerbose(v);