Class HeaderStyle


  • public class HeaderStyle
    extends Object
    • Field Detail

      • name

        @Parameter(required=true)
        public String name
        The name of this header style
      • firstLine

        @Parameter
        public String firstLine
        The first fixed line of this header. Default to none.
      • endLine

        @Parameter
        public String endLine
        The last fixed line of this header. Default to none.
      • beforeEachLine

        @Parameter
        public String beforeEachLine
        The characters to prepend before each license header lines. Default to empty.
      • afterEachLine

        @Parameter
        public String afterEachLine
        The characters to append after each license header lines. Default to empty.
      • multiLine

        @Parameter(alias="multiline")
        public boolean multiLine
        Specify whether this is a multi-line comment style or not.

        A multi-line comment style is equivalent to what we have in Java, where a first line and line will delimit a whole multi-line comment section.

        A style that is not multi-line is usually repeating in each line the characters before and after each line to delimit a one-line comment.

      • allowBlankLines

        @Parameter
        public boolean allowBlankLines
        Only for multi-line comments: specify if blank lines are allowed.

        Defaulted to false because most of the time, a header has some characters on each line (beforeEachLine)

      • padLines

        @Parameter
        public boolean padLines
        Only for non multi-line comments: specify if some spaces should be added after the header line and before the afterEachLine characters so that all the lines are aligned.

        Default to false.

      • skipLinePattern

        @Parameter
        public String skipLinePattern
        A regex to define a first line in a file that should be skipped and kept untouched, like the XML declaration at the top of XML documents

        Non set by default.

      • firstLineDetectionPattern

        @Parameter(required=true)
        public String firstLineDetectionPattern
        The regex used to detect the start of a header section or line
      • lastLineDetectionPattern

        @Parameter(required=true)
        public String lastLineDetectionPattern
        The regex used to detect the end of a header section or line
    • Constructor Detail

      • HeaderStyle

        public HeaderStyle()