Class HeaderFormat
- java.lang.Object
-
- net.kyori.indra.licenser.spotless.HeaderFormat
-
public class HeaderFormat extends java.lang.ObjectA description of a license header format.- Since:
- 2.2.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.Stringbegin()Get text to put at the beginning of an entire header block.static @NotNull HeaderFormatdoubleSlash()Create a header format using a double-slash prefix.@Nullable java.lang.Stringend()Get text to put at the end of an entire header block.static @NotNull HeaderFormatheaderFormat(@Nullable java.lang.String begin, @Nullable java.lang.String linePrefix, @Nullable java.lang.String lineSuffix, @Nullable java.lang.String end)Create a fully custom header format.@Nullable java.lang.StringlinePrefix()Get text to put at the beginning of each header line.@Nullable java.lang.StringlineSuffix()Get text to put at the end of each header line.static @NotNull HeaderFormatprefix(java.lang.String prefix)Create a header format applying a custom prefix to each body line.static @NotNull HeaderFormatstarSlash()Create a header format using star-slash, or C-style format.
-
-
-
Method Detail
-
headerFormat
@NotNull public static @NotNull HeaderFormat headerFormat(@Nullable @Nullable java.lang.String begin, @Nullable @Nullable java.lang.String linePrefix, @Nullable @Nullable java.lang.String lineSuffix, @Nullable @Nullable java.lang.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
@NotNull public static @NotNull HeaderFormat starSlash()
Create a header format using star-slash, or C-style format.- Returns:
- a star-slash header format instance
- Since:
- 2.2.0
-
doubleSlash
@NotNull public static @NotNull HeaderFormat doubleSlash()
Create a header format using a double-slash prefix.- Returns:
- the header prefix to use
- Since:
- 2.2.0
-
prefix
@NotNull public static @NotNull HeaderFormat prefix(java.lang.String 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
@Nullable public @Nullable java.lang.String begin()
Get text to put at the beginning of an entire header block.- Returns:
- the beginning content
- Since:
- 2.2.0
-
linePrefix
@Nullable public @Nullable java.lang.String linePrefix()
Get text to put at the beginning of each header line.- Returns:
- the line prefix content
- Since:
- 2.2.0
-
lineSuffix
@Nullable public @Nullable java.lang.String lineSuffix()
Get text to put at the end of each header line.- Returns:
- the line suffix content
- Since:
- 2.2.0
-
end
@Nullable public @Nullable java.lang.String end()
Get text to put at the end of an entire header block.- Returns:
- the end content
- Since:
- 2.2.0
-
-