Package com.puppycrawl.tools.checkstyle
Class SuppressionsStringPrinter
java.lang.Object
com.puppycrawl.tools.checkstyle.SuppressionsStringPrinter
Class for constructing xpath queries to suppress nodes
 with specified line and column number.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate static StringCreatesXpathQueryGeneratorinstance and generates suppressions.static StringprintSuppressions(File file, String suppressionLineColumnNumber, int tabWidth) Prints generated suppressions.
- 
Field Details- 
VALID_SUPPRESSION_LINE_COLUMN_NUMBER_REGEXLine and column number config value pattern.
- 
LINE_SEPARATOROS specific line separator.
 
- 
- 
Constructor Details- 
SuppressionsStringPrinterprivate SuppressionsStringPrinter()Prevent instances.
 
- 
- 
Method Details- 
printSuppressionspublic static String printSuppressions(File file, String suppressionLineColumnNumber, int tabWidth) throws IOException, CheckstyleException Prints generated suppressions.- Parameters:
- file- the file to process.
- suppressionLineColumnNumber- line and column number of the suppression
- tabWidth- length of the tab character
- Returns:
- generated suppressions.
- Throws:
- IOException- if the file could not be read.
- IllegalStateException- if suppressionLineColumnNumber is not of a valid format.
- CheckstyleException- if the file is not a Java source.
 
- 
generateprivate static String generate(FileText fileText, DetailAST detailAST, int lineNumber, int columnNumber, int tabWidth) CreatesXpathQueryGeneratorinstance and generates suppressions.- Parameters:
- fileText-- FileTextobject.
- detailAST-- DetailASTobject.
- lineNumber- line number.
- columnNumber- column number.
- tabWidth- length of the tab character.
- Returns:
- generated suppressions.
 
 
-