Package org.gmetrics.report
Class AbstractReportWriter
- java.lang.Object
-
- org.gmetrics.report.AbstractReportWriter
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,ReportWriter
- Direct Known Subclasses:
BasicHtmlReportWriter,SingleSeriesHtmlReportWriter,XmlReportWriter
public abstract class AbstractReportWriter extends java.lang.Object implements ReportWriter, groovy.lang.GroovyObject
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.ObjectBASE_MESSAGES_BUNDLEprotected static java.lang.ObjectCUSTOM_MESSAGES_BUNDLEprotected java.lang.ObjectcustomMessagesBundleNameprotected java.lang.ObjectformatterFactoryprotected java.util.Map<Metric,Formatter>formattersprotected java.lang.ObjectgetTimestampprotected static java.lang.ObjectGMETRICS_URLprotected java.lang.ObjectinitializeResourceBundleprotected java.lang.ObjectLOGprotected java.lang.ObjectresourceBundle
-
Constructor Summary
Constructors Constructor Description AbstractReportWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringformatMetricResultValue(java.lang.String metricName, java.lang.Object value)protected java.lang.StringgetFormattedTimestamp()groovy.lang.MetaClassgetMetaClass()java.lang.StringgetOutputFile()java.lang.ObjectgetProperty(java.lang.String property)protected java.lang.StringgetResourceBundleString(java.lang.String resourceKey)protected java.lang.StringgetResourceBundleString(java.lang.String resourceKey, java.lang.String defaultString)protected java.lang.StringgetResourceBundleStringOrNull(java.lang.String resourceKey)java.lang.ObjectgetWriteToStandardOut()protected voidinitializeDefaultResourceBundle()protected voidinitializeFormatters(MetricSet metricSet)java.lang.ObjectinvokeMethod(java.lang.String method, java.lang.Object arguments)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetOutputFile(java.lang.String value)voidsetProperty(java.lang.String property, java.lang.Object value)voidsetWriteToStandardOut(java.lang.Object value)protected abstract voidwriteReport(java.io.Writer writer, ResultsNode resultsNode, AnalysisContext analysisContext)voidwriteReport(ResultsNode resultsNode, AnalysisContext analysisContext)
-
-
-
Field Detail
-
BASE_MESSAGES_BUNDLE
protected static final java.lang.Object BASE_MESSAGES_BUNDLE
-
CUSTOM_MESSAGES_BUNDLE
protected static final java.lang.Object CUSTOM_MESSAGES_BUNDLE
-
GMETRICS_URL
protected static final java.lang.Object GMETRICS_URL
-
LOG
protected final java.lang.Object LOG
-
customMessagesBundleName
protected java.lang.Object customMessagesBundleName
-
resourceBundle
protected java.lang.Object resourceBundle
-
formatterFactory
protected java.lang.Object formatterFactory
-
initializeResourceBundle
protected java.lang.Object initializeResourceBundle
-
getTimestamp
protected java.lang.Object getTimestamp
-
-
Method Detail
-
getResourceBundleString
protected java.lang.String getResourceBundleString(java.lang.String resourceKey)
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject
-
getOutputFile
public java.lang.String getOutputFile()
-
setOutputFile
public void setOutputFile(java.lang.String value)
-
getWriteToStandardOut
public java.lang.Object getWriteToStandardOut()
-
setWriteToStandardOut
public void setWriteToStandardOut(java.lang.Object value)
-
writeReport
protected abstract void writeReport(java.io.Writer writer, ResultsNode resultsNode, AnalysisContext analysisContext)
-
writeReport
public void writeReport(ResultsNode resultsNode, AnalysisContext analysisContext)
- Specified by:
writeReportin interfaceReportWriter
-
initializeDefaultResourceBundle
protected void initializeDefaultResourceBundle()
-
getResourceBundleString
protected java.lang.String getResourceBundleString(java.lang.String resourceKey, java.lang.String defaultString)
-
getResourceBundleStringOrNull
protected java.lang.String getResourceBundleStringOrNull(java.lang.String resourceKey)
-
initializeFormatters
protected void initializeFormatters(MetricSet metricSet)
-
formatMetricResultValue
protected java.lang.String formatMetricResultValue(java.lang.String metricName, java.lang.Object value)
-
getFormattedTimestamp
protected java.lang.String getFormattedTimestamp()
-
-