Class HeaderFormat


  • public class HeaderFormat
    extends java.lang.Object
    A 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.String begin()
      Get text to put at the beginning of an entire header block.
      static @NotNull HeaderFormat doubleSlash()
      Create a header format using a double-slash prefix.
      @Nullable java.lang.String end()
      Get text to put at the end of an entire header block.
      static @NotNull HeaderFormat headerFormat​(@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.String linePrefix()
      Get text to put at the beginning of each header line.
      @Nullable java.lang.String lineSuffix()
      Get text to put at the end of each header line.
      static @NotNull HeaderFormat prefix​(java.lang.String prefix)
      Create a header format applying a custom prefix to each body line.
      static @NotNull HeaderFormat starSlash()
      Create a header format using star-slash, or C-style format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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​(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