Package com.cosium.code.format_spi
Interface CodeFormatter
public interface CodeFormatter
- Author:
- Réda Housni Alaoui
-
Method Summary
Modifier and TypeMethodDescriptionvoidformat(InputStream content, LineRanges lineRanges, OutputStream formattedContent) Formats a content.booleanvalidate(InputStream content)
-
Method Details
-
fileExtension
FileExtension fileExtension()- Returns:
- The file extension supported by this formatter.
-
format
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- TheOutputStreamto write the formatted content to.
-
validate
- Returns:
- true if the provided content is correctly formatted. false otherwise.
-