Class AbstractReportWriter

    • Field Detail

      • BASE_MESSAGES_BUNDLE

        protected static final java.lang.String BASE_MESSAGES_BUNDLE
        See Also:
        Constant Field Values
      • CUSTOM_MESSAGES_BUNDLE

        protected static final java.lang.String CUSTOM_MESSAGES_BUNDLE
        See Also:
        Constant Field Values
      • getTimestamp

        protected groovy.lang.Closure getTimestamp
      • customMessagesBundleName

        protected java.lang.String customMessagesBundleName
      • resourceBundle

        protected java.util.ResourceBundle resourceBundle
      • initializeResourceBundle

        protected groovy.lang.Closure initializeResourceBundle
    • Constructor Detail

      • AbstractReportWriter

        public AbstractReportWriter()
    • Method Detail

      • getResourceBundleString

        protected java.lang.String getResourceBundleString​(java.lang.String resourceKey,
                                                           java.lang.String defaultString)
      • getResourceBundleString

        protected java.lang.String getResourceBundleString​(java.lang.String resourceKey)
      • getMetaClass

        public groovy.lang.MetaClass getMetaClass()
        Specified by:
        getMetaClass in interface groovy.lang.GroovyObject
      • setMetaClass

        public void setMetaClass​(groovy.lang.MetaClass mc)
        Specified by:
        setMetaClass in interface groovy.lang.GroovyObject
      • invokeMethod

        public java.lang.Object invokeMethod​(java.lang.String method,
                                             java.lang.Object arguments)
        Specified by:
        invokeMethod in interface groovy.lang.GroovyObject
      • getProperty

        public java.lang.Object getProperty​(java.lang.String property)
        Specified by:
        getProperty in interface groovy.lang.GroovyObject
      • setProperty

        public void setProperty​(java.lang.String property,
                                java.lang.Object value)
        Specified by:
        setProperty in interface groovy.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

        public abstract void writeReport​(java.io.Writer writer,
                                         AnalysisContext analysisContext,
                                         Results results)
      • initializeDefaultResourceBundle

        protected void initializeDefaultResourceBundle()
      • getHtmlDescriptionForRule

        protected java.lang.String getHtmlDescriptionForRule​(Rule rule)
      • getDescriptionForRule

        protected java.lang.String getDescriptionForRule​(Rule rule)
      • getResourceBundleString

        protected java.lang.String getResourceBundleString​(java.lang.String resourceKey,
                                                           java.lang.String defaultString,
                                                           boolean logWarning)
      • getFormattedTimestamp

        protected java.lang.String getFormattedTimestamp()
      • getSortedRules

        protected java.util.List getSortedRules​(AnalysisContext analysisContext)
      • isEnabled

        protected boolean isEnabled​(Rule rule)
      • getCodeNarcVersion

        protected java.lang.String getCodeNarcVersion()