JML

org.jmlspecs.ant.tasks
Class CommonOptionsTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.jmlspecs.ant.tasks.AbstractFileSetTask
              extended byorg.jmlspecs.ant.tasks.CommonOptionsTask
Direct Known Subclasses:
CheckTask, CompileTask, DocTask

public class CommonOptionsTask
extends AbstractFileSetTask

An abstract Ant task that holds common options for the JML tools, including FileSets.

Version:
$Revision: 1.3 $
Author:
Marko van Dooren, Gary T. Leavens

Class Specifications

Specifications inherited from class AbstractFileSetTask
private invariant !this._filesets.contains(null);
private invariant ( \forall java.lang.Object o; this._filesets.contains(o); o instanceof org.apache.tools.ant.types.FileSet);

Specifications inherited from class Object
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this);

Nested Class Summary
 
Nested classes inherited from class org.jmlspecs.ant.tasks.AbstractFileSetTask
AbstractFileSetTask.FileSetVisitor
 
Model Field Summary
 
Model fields inherited from class java.lang.Object
_getClass, objectState, theString
 
Ghost Field Summary
 
Ghost fields inherited from class java.lang.Object
objectTimesFinalized, owner
 
Field Summary
private  String _classPath
           
private  String _destination
           
private  boolean _recursive
           
private  String _sourcePath
           
private  boolean _verbose
           
 
Fields inherited from class org.jmlspecs.ant.tasks.AbstractFileSetTask
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
CommonOptionsTask()
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
 String[] getArguments()
          Return an array of the argument strings for running a JML tool.
 String getClasspath()
          Return the classpath of this CheckTask.
 String getDestination()
          Return the destination of this CompileTask.
 List getFilesAndDirectories()
          Return a list of the files and directories needed for running a tool.
 boolean getRecursive()
          Check whether or not this task works recursive.
 String getSourcepath()
          Return the sourcepath of this CheckTask.
 List getToolSpecificOptions()
          Return a list of the tool-specific options for running a JML tool.
 boolean getVerbose()
          Check whether or not this task should be verbose.
 void setClasspath(String classpath)
          Set the CLASSPATH.
 void setDestination(String destination)
          Set the destination of this CompileTask.
 void setRecursive(boolean recursive)
          Set the verbosity
 void setSourcepath(String sourcepath)
          Set the sourcepath for the JML checker.
 void setVerbose(boolean verbose)
          Set the verbosity
 
Methods inherited from class org.jmlspecs.ant.tasks.AbstractFileSetTask
addFileset, getFileSets
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_recursive

private boolean _recursive

_verbose

private boolean _verbose

_classPath

private String _classPath

_destination

private String _destination

_sourcePath

private String _sourcePath
Constructor Detail

CommonOptionsTask

public CommonOptionsTask()
Specifications:
ensures !this.getVerbose()&&!this.getRecursive();
ensures this.getFileSets() != null&&this.getFileSets().isEmpty();
Method Detail

getArguments

public String[] getArguments()
                      throws Exception
Return an array of the argument strings for running a JML tool.

Throws:
Exception
Specifications: non_null

getToolSpecificOptions

public List getToolSpecificOptions()
Return a list of the tool-specific options for running a JML tool.

Specifications: pure non_null

getFilesAndDirectories

public List getFilesAndDirectories()
                            throws Exception
Return a list of the files and directories needed for running a tool.

Throws:
Exception
Specifications: non_null

getRecursive

public boolean getRecursive()
Check whether or not this task works recursive.

Specifications: pure

setRecursive

public void setRecursive(boolean recursive)
Set the verbosity

Parameters:
recursive - True if the task should work recursive, false otherwise.
Specifications:
ensures this.getRecursive() == recursive;

getVerbose

public boolean getVerbose()
Check whether or not this task should be verbose.

Specifications: pure

setVerbose

public void setVerbose(boolean verbose)
Set the verbosity

Parameters:
verbose - True if the task should be verbose, false otherwise.
Specifications:
ensures this.getVerbose() == verbose;

setClasspath

public void setClasspath(String classpath)
Set the CLASSPATH.

Parameters:
classpath - The CLASSPATH.
Specifications:
ensures this.getClasspath() == classpath;

getClasspath

public String getClasspath()
Return the classpath of this CheckTask.

Specifications: pure

setDestination

public void setDestination(String destination)
Set the destination of this CompileTask.

Parameters:
destination - A String containing the directory where the files should be put.
Specifications:
ensures this.getDestination() == destination;

getDestination

public String getDestination()
Return the destination of this CompileTask.

Specifications: pure

setSourcepath

public void setSourcepath(String sourcepath)
Set the sourcepath for the JML checker.

Parameters:
sourcepath - The sourcepath.
Specifications:
ensures this.getSourcepath() == sourcepath;

getSourcepath

public String getSourcepath()
Return the sourcepath of this CheckTask.

Specifications: pure

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.