public class JavaExtension extends FormatExtension
Modifier and Type | Field and Description |
---|---|
static String |
LICENSE_HEADER_DELIMITER |
static String |
NAME |
name, root, steps, target
Constructor and Description |
---|
JavaExtension(SpotlessExtension rootExtension) |
Modifier and Type | Method and Description |
---|---|
void |
eclipseFormatFile(Object eclipseFormatFile) |
void |
googleJavaFormat()
Uses the [google-java-format](https://github.com/google/google-java-format) jar to format source code.
|
void |
googleJavaFormat(String version)
Uses the given version of [google-java-format](https://github.com/google/google-java-format) to format source code.
|
void |
importOrder(List<String> importOrder) |
void |
importOrderFile(Object importOrderFile) |
void |
licenseHeader(String licenseHeader) |
void |
licenseHeaderFile(Object licenseHeaderFile) |
protected void |
setupTask(FormatTask task)
If the user hasn't specified the files yet, we'll assume he/she means all of the java files.
|
custom, custom, customLazy, customLazyGroovy, customReplace, customReplaceRegex, encoding, endWithNewline, getEncoding, getLineEndings, getProject, indentWithSpaces, indentWithSpaces, indentWithTabs, indentWithTabs, licenseHeader, licenseHeaderFile, paddedCell, paddedCell, parseTarget, setEncoding, setEncoding, setLineEndings, target, trimTrailingWhitespace
public static final String NAME
public static final String LICENSE_HEADER_DELIMITER
public JavaExtension(SpotlessExtension rootExtension)
public void licenseHeader(String licenseHeader)
public void licenseHeaderFile(Object licenseHeaderFile)
public void importOrderFile(Object importOrderFile)
public void eclipseFormatFile(Object eclipseFormatFile)
public void googleJavaFormat()
public void googleJavaFormat(String version)
protected void setupTask(FormatTask task) throws Exception
setupTask
in class FormatExtension
Exception