public abstract class AbstractPrintfChecker extends AbstractMethodDetection
| Modifier and Type | Field and Description |
|---|---|
protected static MethodMatcher |
MESSAGE_FORMAT |
protected static Pattern |
MESSAGE_FORMAT_PATTERN |
context| Constructor and Description |
|---|
AbstractPrintfChecker() |
| Modifier and Type | Method and Description |
|---|---|
protected static Set<Integer> |
argIndexes(List<String> params) |
protected static String |
cleanupDoubleQuote(String formatString) |
protected static void |
cleanupLineSeparator(List<String> params) |
protected static Integer |
getIndex(String param) |
protected static Set<Integer> |
getMessageFormatIndexes(String formatString) |
protected List<MethodMatcher> |
getMethodInvocationMatchers() |
protected List<String> |
getParameters(String formatString,
MethodInvocationTree mit) |
protected abstract void |
handleMessageFormat(MethodInvocationTree mit,
String formatString,
List<ExpressionTree> args) |
protected abstract void |
handlePrintfFormat(MethodInvocationTree mit,
String formatString,
List<ExpressionTree> args) |
protected static boolean |
isNewArrayWithInitializers(ExpressionTree expression) |
protected void |
reportMissingPrevious(MethodInvocationTree mit) |
nodesToVisit, onConstructorFound, onMethodInvocationFound, visitNodeaddIssue, addIssueOnFile, reportIssue, reportIssue, reportIssuehasSemantic, leaveNode, scanFile, scanTree, visitToken, visitTriviaprotected static final MethodMatcher MESSAGE_FORMAT
protected static final Pattern MESSAGE_FORMAT_PATTERN
protected List<MethodMatcher> getMethodInvocationMatchers()
getMethodInvocationMatchers in class AbstractMethodDetectionprotected abstract void handlePrintfFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
protected abstract void handleMessageFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
protected static boolean isNewArrayWithInitializers(ExpressionTree expression)
protected List<String> getParameters(String formatString, MethodInvocationTree mit)
protected void reportMissingPrevious(MethodInvocationTree mit)
Copyright © 2012–2017 SonarSource. All rights reserved.