| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.optional.metamata.AbstractMetamataTask
Somewhat abstract framework to be used for other metama 2.0 tasks. This should include, audit, metrics, cover and mparse. For more information, visit the website at www.metamata.com
| Field Summary | |
| protected  Path | classPathThe user classpath to be provided. | 
| protected  CommandlineJava | cmdlthe command line used to run MAudit | 
| protected  java.util.Vector | fileSetsthe set of files to be audited | 
| protected  java.util.Hashtable | includedFiles | 
| protected  java.io.File | metamataHomeMetamata home directory. | 
| protected  java.io.File | optionsFilethe options file where are stored the command line options | 
| protected  Path | sourcePaththe path to the source file | 
| 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 | |
|   | AbstractMetamataTask() | 
| protected  | AbstractMetamataTask(java.lang.String className)initialize the task with the classname of the task to run | 
| Method Summary | |
| protected static void | addAllVector(java.util.Vector dest,
             java.util.Enumeration files)convenient method for JDK 1.1. | 
|  void | addFileSet(FileSet fs)The java files or directory to audit. | 
| protected  void | checkOptions()validate options set | 
| protected  void | cleanUp()clean up all the mess that we did with temporary objects | 
|  Path | createClasspath()Sets the class path (also source path unless one explicitly set). | 
|  Commandline.Argument | createJvmarg()Additional optional parameters to pass to the JVM. | 
|  Path | createSourcepath()Sets the source path. | 
| protected abstract  ExecuteStreamHandler | createStreamHandler()create a stream handler that will be used to get the output since metamata tools do not report with convenient files such as XML. | 
| protected  java.io.File | createTmpFile() | 
|  void | execute()execute the command line | 
| protected  void | execute0(ExecuteStreamHandler handler)execute the process with a specific handler | 
| protected  void | generateOptionsFile(java.io.File tofile,
                    java.util.Vector options) | 
| protected  java.util.Hashtable | getFileMapping() | 
| protected  java.io.File | getMetamataJar(java.io.File home)return the location of the jar file used to run | 
| protected abstract  java.util.Vector | getOptions()return all options of the command line as string elements | 
| protected  java.util.Hashtable | scanSources(java.util.Hashtable map) | 
| protected  java.util.Hashtable | scanSources(java.util.Hashtable mapping,
            java.lang.String[] entries) | 
|  void | setHome(java.io.File value)the metamata.home property to run all tasks. | 
|  void | setMaxmemory(java.lang.String max)Set the maximum memory for the JVM; optional. | 
|  void | setMetamatahome(java.io.File value)The home directory containing the Metamata distribution; required | 
| protected  void | setUp()check the options and build the command line | 
| Methods inherited from class org.apache.tools.ant.Task | 
| 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 | 
protected Path classPath
protected Path sourcePath
protected java.io.File metamataHome
protected CommandlineJava cmdl
protected java.util.Vector fileSets
protected java.io.File optionsFile
protected java.util.Hashtable includedFiles
| Constructor Detail | 
public AbstractMetamataTask()
protected AbstractMetamataTask(java.lang.String className)
| Method Detail | 
public void setHome(java.io.File value)
public void setMetamatahome(java.io.File value)
public Path createClasspath()
public Path createSourcepath()
public Commandline.Argument createJvmarg()
<jvmarg> by adding these empty
 entries to metamata.properties located at ${metamata.home}/bin
 metamata.classpath= metamata.sourcepath= metamata.baseclasspath=
public void setMaxmemory(java.lang.String max)
public void addFileSet(FileSet fs)
public void execute()
             throws BuildException
execute in class TaskBuildException - if something goes wrong with the build
protected void setUp()
              throws BuildException
BuildExceptionprotected abstract ExecuteStreamHandler createStreamHandler()
protected void execute0(ExecuteStreamHandler handler)
                 throws BuildException
BuildExceptionprotected void cleanUp()
protected final java.io.File getMetamataJar(java.io.File home)
protected void checkOptions()
                     throws BuildException
BuildExceptionprotected abstract java.util.Vector getOptions()
protected void generateOptionsFile(java.io.File tofile,
                                   java.util.Vector options)
                            throws BuildException
BuildExceptionprotected java.util.Hashtable getFileMapping()
protected static final void addAllVector(java.util.Vector dest,
                                         java.util.Enumeration files)
protected final java.io.File createTmpFile()
protected java.util.Hashtable scanSources(java.util.Hashtable map)
protected java.util.Hashtable scanSources(java.util.Hashtable mapping,
                                          java.lang.String[] entries)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||