Interface JavaFormatConfig


public interface JavaFormatConfig
Support for the .springjavaformatconfig file that can be used to apply settings on a per-project basis.
Author:
Phillip Webb
  • Field Details

  • Method Details

    • getJavaBaseline

      JavaBaseline getJavaBaseline()
      Java JDK baseline version expected be used when formatting.
      Returns:
      the JDK version
    • getIndentationStyle

      IndentationStyle getIndentationStyle()
      Return the indentation style that should be used with the project.
      Returns:
      the indentation style
    • findFrom

      static JavaFormatConfig findFrom(Path path)
      Find and load a .springjavaformatconfig by searching from the given file.
      Parameters:
      path - the file or directory to search from
      Returns:
      a loaded JavaFormatConfig or DEFAULT if no .springjavaformatconfig file is found
    • findFrom

      static JavaFormatConfig findFrom(File file)
      Find and load a .springjavaformatconfig by searching from the given file.
      Parameters:
      file - the file or directory to search from
      Returns:
      a loaded JavaFormatConfig or DEFAULT if no .springjavaformatconfig file is found
    • load

      static JavaFormatConfig load(File file)
      Load a JavaFormatConfig from the given file.
      Parameters:
      file - the file to load
      Returns:
      the loaded config
    • load

      static JavaFormatConfig load(InputStream inputStream)
      Load a JavaFormatConfig from the given input stream.
      Parameters:
      inputStream - the input stream to load
      Returns:
      the loaded config
    • of

      static JavaFormatConfig of(JavaBaseline javaBaseline, IndentationStyle indentationStyle)
      Factory method to create a JavaFormatConfig with specific settings.
      Parameters:
      javaBaseline - The baseline JDK version
      indentationStyle - the indentation style
      Returns:
      a JavaFormatConfig instance