|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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 |
classPath
The user classpath to be provided. |
protected CommandlineJava |
cmdl
the command line used to run MAudit |
protected java.util.Vector |
fileSets
the set of files to be audited |
protected java.util.Hashtable |
includedFiles
|
protected java.io.File |
metamataHome
Metamata home directory. |
protected java.io.File |
optionsFile
the options file where are stored the command line options |
protected Path |
sourcePath
the 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 be audited |
protected void |
checkOptions()
validate options set |
protected void |
cleanUp()
clean up all the mess that we did with temporary objects |
Path |
createClasspath()
user classpath |
Commandline.Argument |
createJvmarg()
Creates a nested jvmarg element. |
Path |
createSourcepath()
create the source path for this task |
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 static 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 |
scanFileSets()
|
void |
setMaxmemory(java.lang.String max)
-mx or -Xmx depending on VM version |
void |
setMetamatahome(java.io.File metamataHome)
the metamata.home property to run all tasks. |
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, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
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 setMetamatahome(java.io.File metamataHome)
public Path createClasspath()
public Path createSourcepath()
public Commandline.Argument createJvmarg()
public void setMaxmemory(java.lang.String max)
public void addFileSet(FileSet fs)
public void execute() throws BuildException
execute
in class Task
org.apache.tools.ant.Task
BuildException
- if someting goes wrong with the buildprotected void setUp() throws BuildException
protected abstract ExecuteStreamHandler createStreamHandler()
protected void execute0(ExecuteStreamHandler handler) throws BuildException
protected void cleanUp()
protected final java.io.File getMetamataJar(java.io.File home)
protected void checkOptions() throws BuildException
protected abstract java.util.Vector getOptions()
protected void generateOptionsFile(java.io.File tofile, java.util.Vector options) throws BuildException
protected java.util.Hashtable getFileMapping()
protected static final void addAllVector(java.util.Vector dest, java.util.Enumeration files)
protected static final java.io.File createTmpFile()
protected java.util.Hashtable scanFileSets()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |