org.apache.tools.ant.taskdefs.optional.metamata
public class MMetricsStreamHandler extends Object implements ExecuteStreamHandler
This class can be used to transform a text file or to process the output stream directly.
Method Summary | |
---|---|
protected Attributes | createAttributes(MetricsElement elem)
Create all attributes of a MetricsElement skipping those who have an
empty string |
protected String | getConstructType(MetricsElement elem)
return the construct type of the element. |
protected void | parseOutput() read each line and process it |
protected void | processLine(String line)
Process a metrics line. |
void | setProcessErrorStream(InputStream p1) Ignore. |
void | setProcessInputStream(OutputStream p1) Ignore. |
void | setProcessOutputStream(InputStream is) Set the inputstream |
void | start() |
protected void | startElement(MetricsElement elem)
Start a new construct. |
void | stop()
Pretty dangerous business here. |
Parameters: elem the metrics element to guess for its type.
Returns: the type of the metrics element, either PACKAGE, FILE, CLASS or METHOD.
Parameters: line the line to process, it is normally a line full of metrics.
Parameters: elem the element to process.
Throws: SAXException thrown if there is a problem when sending SAX events.