Package com.spotify.fmt
Class AbstractFMT
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.spotify.fmt.AbstractFMT
-
-
Constructor Summary
Constructors Constructor Description AbstractFMT()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidexecute()execute.protected abstract StringgetProcessingLabel()Provides the name of the label used when a non-formatted file is found.com.spotify.fmt.FormattingResultgetResult()protected voidpostExecute(com.spotify.fmt.FormattingResult result)Post Execute action.protected abstract booleanshouldWriteReformattedFiles()Whether to write reformatted files to disk.
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoFailureExceptionexecute.- Throws:
org.apache.maven.plugin.MojoFailureException
-
postExecute
protected void postExecute(com.spotify.fmt.FormattingResult result) throws org.apache.maven.plugin.MojoFailureExceptionPost Execute action. It is called at the end of the execute method. Subclasses can add extra checks.- Parameters:
result- The formatting result- Throws:
org.apache.maven.plugin.MojoFailureException
-
getResult
public com.spotify.fmt.FormattingResult getResult()
-
shouldWriteReformattedFiles
protected abstract boolean shouldWriteReformattedFiles()
Whether to write reformatted files to disk.
-
getProcessingLabel
protected abstract String getProcessingLabel()
Provides the name of the label used when a non-formatted file is found.- Returns:
- the label to use in the log
-
-