Class HeaderFormat
java.lang.Object
net.kyori.indra.licenser.spotless.HeaderFormat
A description of a license header format.
- Since:
- 2.2.0
-
Method Summary
Modifier and TypeMethodDescription@Nullable Stringbegin()Get text to put at the beginning of an entire header block.static @NotNull HeaderFormatCreate a header format using a double-slash prefix.@Nullable Stringend()Get text to put at the end of an entire header block.static @NotNull HeaderFormatheaderFormat(@Nullable String begin, @Nullable String linePrefix, @Nullable String lineSuffix, @Nullable String end) Create a fully custom header format.@Nullable StringGet text to put at the beginning of each header line.@Nullable StringGet text to put at the end of each header line.static @NotNull HeaderFormatCreate a header format applying a custom prefix to each body line.static @NotNull HeaderFormatCreate a header format using star-slash, or C-style format.
-
Method Details
-
headerFormat
@NotNull public static @NotNull HeaderFormat headerFormat(@Nullable @Nullable String begin, @Nullable @Nullable String linePrefix, @Nullable @Nullable String lineSuffix, @Nullable @Nullable String end) Create a fully custom header format.- Parameters:
begin- text to put at the beginning of the header blocklinePrefix- text to put at the beginning of every linelineSuffix- text to put at the end of every lineend- text to put at the end of the header block- Returns:
- a new header format object
- Since:
- 2.2.0
-
starSlash
Create a header format using star-slash, or C-style format.- Returns:
- a star-slash header format instance
- Since:
- 2.2.0
-
doubleSlash
Create a header format using a double-slash prefix.- Returns:
- the header prefix to use
- Since:
- 2.2.0
-
prefix
Create a header format applying a custom prefix to each body line.- Parameters:
prefix- the body line prefix- Returns:
- the created header format
- Since:
- 2.2.0
-
begin
Get text to put at the beginning of an entire header block.- Returns:
- the beginning content
- Since:
- 2.2.0
-
linePrefix
Get text to put at the beginning of each header line.- Returns:
- the line prefix content
- Since:
- 2.2.0
-
lineSuffix
Get text to put at the end of each header line.- Returns:
- the line suffix content
- Since:
- 2.2.0
-
end
Get text to put at the end of an entire header block.- Returns:
- the end content
- Since:
- 2.2.0
-