Class AbstractPrintfChecker

    • Field Detail

      • LEVELS

        protected static final List<String> LEVELS
      • MESSAGE_FORMAT

        protected static final org.sonar.java.matcher.MethodMatcher MESSAGE_FORMAT
      • JAVA_UTIL_LOGGER

        protected static final org.sonar.java.matcher.MethodMatcher JAVA_UTIL_LOGGER
      • MESSAGE_FORMAT_PATTERN

        protected static final Pattern MESSAGE_FORMAT_PATTERN
    • Constructor Detail

      • AbstractPrintfChecker

        public AbstractPrintfChecker()
    • Method Detail

      • handlePrintfFormat

        protected abstract void handlePrintfFormat​(org.sonar.plugins.java.api.tree.MethodInvocationTree mit,
                                                   String formatString,
                                                   List<org.sonar.plugins.java.api.tree.ExpressionTree> args)
      • handleMessageFormat

        protected abstract void handleMessageFormat​(org.sonar.plugins.java.api.tree.MethodInvocationTree mit,
                                                    String formatString,
                                                    List<org.sonar.plugins.java.api.tree.ExpressionTree> args)
      • isNewArrayWithInitializers

        protected static boolean isNewArrayWithInitializers​(org.sonar.plugins.java.api.tree.ExpressionTree expression)
      • cleanupDoubleQuote

        protected static String cleanupDoubleQuote​(String formatString)
      • getMessageFormatIndexes

        protected static Set<Integer> getMessageFormatIndexes​(String formatString,
                                                              org.sonar.plugins.java.api.tree.MethodInvocationTree mit)
      • getParameters

        protected List<String> getParameters​(String formatString,
                                             org.sonar.plugins.java.api.tree.MethodInvocationTree mit)
      • reportMissingPrevious

        protected void reportMissingPrevious​(org.sonar.plugins.java.api.tree.MethodInvocationTree mit)
      • cleanupLineSeparator

        protected static void cleanupLineSeparator​(List<String> params)