Class SpringHeaderCheck

  • All Implemented Interfaces:
    com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable, com.puppycrawl.tools.checkstyle.api.FileSetCheck

    public class SpringHeaderCheck
    extends com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
    Checks that the source headers follow Spring conventions.
    Author:
    Phillip Webb
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

        com.puppycrawl.tools.checkstyle.api.AutomaticBean.OutputStreamOptions
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void finishLocalSetup()  
      protected void processFiltered​(File file, com.puppycrawl.tools.checkstyle.api.FileText fileText)  
      void setBlankLineAfter​(boolean blankLineAfter)  
      void setCharset​(String charset)  
      void setHeaderCopyrightPattern​(String headerCopyrightPattern)  
      void setHeaderFile​(URI headerFile)  
      void setHeaderType​(String headerType)  
      void setPackageInfoHeaderFile​(URI packageInfoHeaderFile)  
      void setPackageInfoHeaderType​(String packageInfoHeaderType)  
      • Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck

        addMessages, beginProcessing, destroy, finishProcessing, fireErrors, getFileContents, getFileExtensions, getMessageDispatcher, getMessages, getTabWidth, init, log, log, process, setFileContents, setFileExtensions, setMessageDispatcher, setTabWidth
      • Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

        getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
      • Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

        configure, contextualize, getConfiguration, setupChild
      • Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Configurable

        configure
      • Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Contextualizable

        contextualize
    • Field Detail

      • DEFAULT_HEADER_COPYRIGHT_PATTERN

        public static final String DEFAULT_HEADER_COPYRIGHT_PATTERN
        The default header copyright pattern.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SpringHeaderCheck

        public SpringHeaderCheck()
    • Method Detail

      • finishLocalSetup

        protected void finishLocalSetup()
                                 throws com.puppycrawl.tools.checkstyle.api.CheckstyleException
        Overrides:
        finishLocalSetup in class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
        Throws:
        com.puppycrawl.tools.checkstyle.api.CheckstyleException
      • processFiltered

        protected void processFiltered​(File file,
                                       com.puppycrawl.tools.checkstyle.api.FileText fileText)
                                throws com.puppycrawl.tools.checkstyle.api.CheckstyleException
        Specified by:
        processFiltered in class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
        Throws:
        com.puppycrawl.tools.checkstyle.api.CheckstyleException
      • setHeaderType

        public void setHeaderType​(String headerType)
      • setHeaderFile

        public void setHeaderFile​(URI headerFile)
                           throws com.puppycrawl.tools.checkstyle.api.CheckstyleException
        Throws:
        com.puppycrawl.tools.checkstyle.api.CheckstyleException
      • setHeaderCopyrightPattern

        public void setHeaderCopyrightPattern​(String headerCopyrightPattern)
      • setPackageInfoHeaderType

        public void setPackageInfoHeaderType​(String packageInfoHeaderType)
      • setPackageInfoHeaderFile

        public void setPackageInfoHeaderFile​(URI packageInfoHeaderFile)
      • setBlankLineAfter

        public void setBlankLineAfter​(boolean blankLineAfter)