Package com.spotify.fmt
Class Formatter
java.lang.Object
com.spotify.fmt.Formatter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FormattingConfigurationprivate static final org.apache.maven.plugin.logging.Logprivate final CopyOnWriteArrayList<String> private final CopyOnWriteArrayList<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) FormattingResultformat()private booleanformatSourceFile(File file, com.google.googlejavaformat.java.Formatter formatter, com.google.googlejavaformat.java.JavaFormatterOptions.Style style) voidformatSourceFilesInDirectory(File directory, com.google.googlejavaformat.java.Formatter formatter, com.google.googlejavaformat.java.JavaFormatterOptions.Style style) private FileFilterprivate com.google.googlejavaformat.java.FormattergetFormatter(com.google.googlejavaformat.java.JavaFormatterOptions.Style style) private FileFilterprotected voidprivate com.google.googlejavaformat.java.JavaFormatterOptions.Stylestyle()
-
Field Details
-
log
private static final org.apache.maven.plugin.logging.Log log -
cfg
-
processedFiles
-
nonComplyingFiles
-
-
Constructor Details
-
Formatter
Formatter(FormattingConfiguration cfg)
-
-
Method Details
-
format
- Throws:
FormatterException
-
formatSourceFilesInDirectory
public void formatSourceFilesInDirectory(File directory, com.google.googlejavaformat.java.Formatter formatter, com.google.googlejavaformat.java.JavaFormatterOptions.Style style) throws FormatterException - Throws:
FormatterException
-
getFormatter
private com.google.googlejavaformat.java.Formatter getFormatter(com.google.googlejavaformat.java.JavaFormatterOptions.Style style) -
style
private com.google.googlejavaformat.java.JavaFormatterOptions.Style style() throws FormatterException- Throws:
FormatterException
-
getFileNameFilter
-
getPathFilter
-
formatSourceFile
private boolean formatSourceFile(File file, com.google.googlejavaformat.java.Formatter formatter, com.google.googlejavaformat.java.JavaFormatterOptions.Style style) -
logNumberOfFilesProcessed
protected void logNumberOfFilesProcessed()
-