Package io.spring.javaformat.config
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic JavaFormatConfigFind and load a.springjavaformatconfigby searching from the given file.static JavaFormatConfigFind and load a.springjavaformatconfigby searching from the given file.Return the indentation style that should be used with the project.Java JDK baseline version expected be used when formatting.static JavaFormatConfigLoad aJavaFormatConfigfrom the given file.static JavaFormatConfigload(InputStream inputStream) Load aJavaFormatConfigfrom the given input stream.static JavaFormatConfigof(JavaBaseline javaBaseline, IndentationStyle indentationStyle) Factory method to create aJavaFormatConfigwith specific settings.
-
Field Details
-
DEFAULT
The defaultJavaFormatConfig.
-
-
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
Find and load a.springjavaformatconfigby searching from the given file.- Parameters:
path- the file or directory to search from- Returns:
- a loaded
JavaFormatConfigorDEFAULTif no.springjavaformatconfigfile is found
-
findFrom
Find and load a.springjavaformatconfigby searching from the given file.- Parameters:
file- the file or directory to search from- Returns:
- a loaded
JavaFormatConfigorDEFAULTif no.springjavaformatconfigfile is found
-
load
Load aJavaFormatConfigfrom the given file.- Parameters:
file- the file to load- Returns:
- the loaded config
-
load
Load aJavaFormatConfigfrom the given input stream.- Parameters:
inputStream- the input stream to load- Returns:
- the loaded config
-
of
Factory method to create aJavaFormatConfigwith specific settings.- Parameters:
javaBaseline- The baseline JDK versionindentationStyle- the indentation style- Returns:
- a
JavaFormatConfiginstance
-