Package com.diffplug.spotless
Class Formatter
java.lang.Object
com.diffplug.spotless.Formatter
- All Implemented Interfaces:
Serializable
,AutoCloseable
Formatter which performs the full formatting.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final File
This Sentinel reference may be used to pass string content to a Formatter or FormatterStep when there is no actual File to format -
Method Summary
Modifier and TypeMethodDescriptionstatic Formatter.Builder
builder()
void
close()
Returns the result of calling all of the FormatterSteps.computeLineEndings
(String unix, File file) Applies the appropriate line endings to the given unix content.boolean
getSteps()
int
hashCode()
-
Field Details
-
NO_FILE_SENTINEL
This Sentinel reference may be used to pass string content to a Formatter or FormatterStep when there is no actual File to format
-
-
Method Details
-
getLineEndingsPolicy
-
getEncoding
-
getSteps
-
builder
-
computeLineEndings
Applies the appropriate line endings to the given unix content. -
compute
Returns the result of calling all of the FormatterSteps. The input must have unix line endings, and the output is guaranteed to also have unix line endings. -
hashCode
public int hashCode() -
equals
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-