@Mojo(name="format",
defaultPhase=PROCESS_SOURCES,
requiresProject=true,
threadSafe=true)
public class FormatterMojo
extends org.apache.maven.plugin.AbstractMojo
implements net.revelc.code.formatter.ConfigurationSource
| Constructor and Description |
|---|
FormatterMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFormatFile(File file,
net.revelc.code.formatter.FormatterMojo.ResultCollector rc,
Properties hashCache,
String basedirPath,
boolean dryRun)
Format individual file.
|
void |
execute()
Execute.
|
String |
getCompilerCodegenTargetPlatform() |
String |
getCompilerCompliance() |
String |
getCompilerSources() |
Charset |
getEncoding() |
File |
getTargetDirectory() |
getLog, getPluginContext, setLog, setPluginContextpublic void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionException - the mojo execution exceptionorg.apache.maven.plugin.MojoFailureException - the mojo failure exceptionMojo.execute()protected void doFormatFile(File file, net.revelc.code.formatter.FormatterMojo.ResultCollector rc, Properties hashCache, String basedirPath, boolean dryRun) throws IOException, org.eclipse.jface.text.BadLocationException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
file - the filerc - the rchashCache - the hash cachebasedirPath - the basedir pathdryRun - the dry runIOException - Signals that an I/O exception has occurred.org.eclipse.jface.text.BadLocationException - the bad location exceptionorg.apache.maven.plugin.MojoFailureException - the mojo failure exceptionorg.apache.maven.plugin.MojoExecutionException - the mojo execution exceptionpublic String getCompilerSources()
getCompilerSources in interface net.revelc.code.formatter.ConfigurationSourcepublic String getCompilerCompliance()
getCompilerCompliance in interface net.revelc.code.formatter.ConfigurationSourcepublic String getCompilerCodegenTargetPlatform()
getCompilerCodegenTargetPlatform in interface net.revelc.code.formatter.ConfigurationSourcepublic File getTargetDirectory()
getTargetDirectory in interface net.revelc.code.formatter.ConfigurationSourcepublic Charset getEncoding()
getEncoding in interface net.revelc.code.formatter.ConfigurationSourceCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.