Enum Eol

java.lang.Object
java.lang.Enum<Eol>
org.codehaus.mojo.license.Eol
All Implemented Interfaces:
Serializable, Comparable<Eol>

public enum Eol extends Enum<Eol>
End of line values
Since:
1.17
  • Enum Constant Details

    • LF

      public static final Eol LF
      Unix \n
    • CRLF

      public static final Eol CRLF
      Windows \r\n
    • AUTODETECT

      public static final Eol AUTODETECT
      Autodetect the end of line value based on some existing file using autodetect(Path, Charset)
    • PLATFORM

      @Deprecated public static final Eol PLATFORM
      Deprecated.
      kept for backwards compatibility reasons. Use other values of Eol. PLATFORM makes your build irreproducible on other platforms.
      The value of the line.separator system property in the current JVM.
  • Method Details

    • values

      public static Eol[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Eol valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • autodetect

      public static Eol autodetect(Path file, Charset charset) throws IOException
      Throws:
      IOException
    • getEolString

      public String getEolString()