Package com.mycila.maven.plugin.license
Class HeaderStyle
- java.lang.Object
-
- com.mycila.maven.plugin.license.HeaderStyle
-
public class HeaderStyle extends Object
-
-
Field Summary
Fields Modifier and Type Field Description StringafterEachLineThe characters to append after each license header lines.booleanallowBlankLinesOnly for multi-line comments: specify if blank lines are allowed.StringbeforeEachLineThe characters to prepend before each license header lines.StringendLineThe last fixed line of this header.StringfirstLineThe first fixed line of this header.StringfirstLineDetectionPatternThe regex used to detect the start of a header section or lineStringlastLineDetectionPatternThe regex used to detect the end of a header section or linebooleanmultiLineSpecify whether this is a multi-line comment style or not.StringnameThe name of this header stylebooleanpadLinesOnly for non multi-line comments: specify if some spaces should be added after the header line and before theafterEachLinecharacters so that all the lines are aligned.StringskipLinePatternA 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
-
Constructor Summary
Constructors Constructor Description HeaderStyle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeaderDefinitiontoHeaderDefinition()
-
-
-
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 theafterEachLinecharacters 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 documentsNon 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
-
-
Method Detail
-
toHeaderDefinition
public HeaderDefinition toHeaderDefinition()
-
-