Class HeaderFormat

java.lang.Object
net.kyori.indra.licenser.spotless.HeaderFormat

public class HeaderFormat extends Object
A description of a license header format.
Since:
2.2.0
  • 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 block
      linePrefix - text to put at the beginning of every line
      lineSuffix - text to put at the end of every line
      end - 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(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 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 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 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 String end()
      Get text to put at the end of an entire header block.
      Returns:
      the end content
      Since:
      2.2.0