Methods Summary |
---|
public org.apache.tools.ant.types.Path | createInstrpath()
if (m_instrpath == null)
m_instrpath = new Path (project);
return m_instrpath.createPath ();
|
public void | execute()
if (isEnabled ())
{
if (m_instrpath == null)
throw (BuildException) newBuildException (getTaskName ()
+ ": instrumentation path must be specified", location).fillInStackTrace ();
if ((m_outMode != InstrProcessor.OutMode.OUT_MODE_OVERWRITE) && (m_outDir == null))
throw (BuildException) newBuildException (getTaskName ()
+ ": output directory must be specified for '" + m_outMode + "' output mode", location).fillInStackTrace ();
InstrProcessor processor = InstrProcessor.create ();
$assert.ASSERT (m_instrpath != null, "m_instrpath not set");
processor.setInstrPath (m_instrpath.list (), true); // TODO: an option to set 'canonical'?
// processor.setDependsMode ()
processor.setInclExclFilter (getFilterSpecs ());
$assert.ASSERT (m_outMode != null, "m_outMode not set");
processor.setOutMode (m_outMode);
processor.setInstrOutDir (m_outDir != null ? m_outDir.getAbsolutePath () : null);
processor.setMetaOutFile (m_outFile != null ? m_outFile.getAbsolutePath () : null);
processor.setMetaOutMerge (m_outFileMerge);
processor.setPropertyOverrides (getTaskSettings ());
processor.run ();
}
|
public void | setDestdir(java.io.File dir)
if (m_outDir != null)
throw (BuildException) newBuildException (getTaskName ()
+ ": outdir|destdir attribute already set", location).fillInStackTrace ();
m_outDir = dir;
|
public void | setInstrpath(org.apache.tools.ant.types.Path path)
if (m_instrpath == null)
m_instrpath = path;
else
m_instrpath.append (path);
|
public void | setInstrpathRef(org.apache.tools.ant.types.Reference ref)
createInstrpath ().setRefid (ref);
|
public void | setMerge(boolean merge)
m_outFileMerge = merge ? Boolean.TRUE : Boolean.FALSE;
|
public void | setMetadatafile(java.io.File file)
if (m_outFile != null)
throw (BuildException) newBuildException (getTaskName ()
+ ": metadata file attribute already set", location).fillInStackTrace ();
m_outFile = file;
|
public void | setMode(com.vladium.emma.instr.instrTask$ModeAttribute mode)
final InstrProcessor.OutMode outMode = InstrProcessor.OutMode.nameToMode (mode.getValue ());
if (outMode == null)
throw (BuildException) newBuildException (getTaskName ()
+ ": invalid output mode: " + mode.getValue (), location).fillInStackTrace ();
m_outMode = outMode;
|
public void | setOutdir(java.io.File dir)
if (m_outDir != null)
throw (BuildException) newBuildException (getTaskName ()
+ ": outdir|destdir attribute already set", location).fillInStackTrace ();
m_outDir = dir;
|
public void | setOutfile(java.io.File file)
if (m_outFile != null)
throw (BuildException) newBuildException (getTaskName ()
+ ": metadata file attribute already set", location).fillInStackTrace ();
m_outFile = file;
|