Interface CodeFormatter


public interface CodeFormatter
Author:
Réda Housni Alaoui
  • Method Details

    • fileExtension

      FileExtension fileExtension()
      Returns:
      The file extension supported by this formatter.
    • format

      void format(InputStream content, LineRanges lineRanges, OutputStream formattedContent)
      Formats a content.

      The formatter SHOULD strive to format only lines part of the provided line ranges.

      Parameters:
      content - The content to format.
      lineRanges - The line ranges to format.
      formattedContent - The OutputStream to write the formatted content to.
    • validate

      boolean validate(InputStream content)
      Returns:
      true if the provided content is correctly formatted. false otherwise.