Class AbstractFMT

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    Check, FMT

    public abstract class AbstractFMT
    extends org.apache.maven.plugin.AbstractMojo
    • Constructor Detail

      • AbstractFMT

        public AbstractFMT()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoFailureException
        execute.
        Throws:
        org.apache.maven.plugin.MojoFailureException
      • postExecute

        protected void postExecute​(com.spotify.fmt.FormattingResult result)
                            throws org.apache.maven.plugin.MojoFailureException
        Post 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