Package io.spring.javaformat.config
Interface JavaFormatConfig
-
public interface JavaFormatConfigSupport for the.springjavaformatconfigfile that can be used to apply settings on a per-project basis.- Author:
- Phillip Webb
-
-
Field Summary
Fields Modifier and Type Field Description static JavaFormatConfigDEFAULTThe defaultJavaFormatConfig.static JavaFormatConfigSPACESstatic JavaFormatConfigTABS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static JavaFormatConfigfindFrom(File file)Find and load a.springjavaformatconfigby searching from the given file.static JavaFormatConfigfindFrom(Path path)Find and load a.springjavaformatconfigby searching from the given file.IndentationStylegetIndentationStyle()Return the indentation style that should be used with the project.static JavaFormatConfigload(File file)Load aJavaFormatConfigfrom the given file.static JavaFormatConfigload(InputStream inputStream)Load aJavaFormatConfigfrom the given input stream.
-
-
-
Field Detail
-
TABS
static final JavaFormatConfig TABS
-
SPACES
static final JavaFormatConfig SPACES
-
DEFAULT
static final JavaFormatConfig DEFAULT
The defaultJavaFormatConfig.
-
-
Method Detail
-
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.springjavaformatconfigby searching from the given file.- Parameters:
path- the file or directory to search from- Returns:
- a loaded
JavaFormatConfigorDEFAULTif no.springjavaformatconfigfile is found
-
findFrom
static JavaFormatConfig findFrom(File file)
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
static JavaFormatConfig load(File file)
Load aJavaFormatConfigfrom the given file.- Parameters:
file- the file to load- Returns:
- the loaded config
-
load
static JavaFormatConfig load(InputStream inputStream)
Load aJavaFormatConfigfrom the given input stream.- Parameters:
inputStream- the input stream to load- Returns:
- the loaded config
-
-