Package org.sonar.java.checks.methods
Class AbstractMethodDetection
- java.lang.Object
-
- org.sonar.java.ast.visitors.SubscriptionVisitor
-
- org.sonar.plugins.java.api.IssuableSubscriptionVisitor
-
- org.sonar.java.checks.methods.AbstractMethodDetection
-
- All Implemented Interfaces:
org.sonar.plugins.java.api.JavaCheck,org.sonar.plugins.java.api.JavaFileScanner
- Direct Known Subclasses:
AbstractInSynchronizeChecker,AbstractPrintfChecker,AccessibilityChangeCheck,AESAlgorithmCheck,ArrayHashCodeAndToStringCheck,ArraysAsListOfPrimitiveToStreamCheck,AssertionArgumentOrderCheck,AssertionFailInCatchBlockCheck,AssertionsWithoutMessageCheck,AvoidDESCheck,BooleanLiteralInAssertionsCheck,CallToFileDeleteOnExitMethodCheck,CipherBlockChainingCheck,ClassComparedByNameCheck,CollectInsteadOfForeachCheck,CollectionInappropriateCallsCheck,CookieShouldNotContainSensitiveDataCheck,CryptographicKeySizeCheck,DataEncryptionCheck,DataHashingCheck,DateAndTimesCheck,DateFormatWeekYearCheck,DateUtilsTruncateCheck,DefaultEncodingUsageCheck,DeprecatedHashAlgorithmCheck,DisallowedConstructorCheck,DisallowedMethodCheck,DynamicClassLoadCheck,DynamicCodeCheck,EmptyDatabasePasswordCheck,EnumEqualCheck,EqualsOnAtomicClassCheck,ExecCallCheck,FileHandlingCheck,FilesExistsJDK8Check,GetClassLoaderCheck,GetRequestedSessionIdCheck,HttpRefererCheck,HttpRequestsHotspotCheck,IgnoredOperationStatusCheck,InappropriateRegexpCheck,IntegerToHexStringCheck,InvalidDateValuesCheck,JdbcDriverExplicitLoadingCheck,LDAPAuthenticatedConnectionCheck,LDAPDeserializationCheck,LogConfigurationCheck,LongBitsToDoubleOnIntCheck,NioFileDeleteCheck,NotifyCheck,ObjectCreatedOnlyToCallGetClassCheck,ObjectDeserializationCheck,PopulateBeansCheck,PredictableSeedCheck,PreferStreamAnyMatchCheck,PreparedStatementAndResultSetCheck,RedundantStreamCollectCheck,ReflectionOnNonRuntimeAnnotationCheck,RegexPatternsNeedlesslyCheck,ReplaceGuavaWithJava8Check,ResultSetIsLastCheck,ReuseRandomCheck,RunFinalizersCheck,ScheduledThreadPoolExecutorZeroCheck,SecureXmlTransformerCheck,SerializableObjectInSessionCheck,SillyEqualsCheck,SMTPSSLServerIdentityCheck,SocketUsageCheck,SpringAntMatcherOrderCheck,SpringSecurityDisableCSRFCheck,StandardCharsetsConstantsCheck,StreamPeekCheck,StringMethodsOnSingleCharCheck,StringMethodsWithLocaleCheck,StringOffsetMethodsCheck,StringPrimitiveConstructorCheck,StringToStringCheck,ThreadLocalWithInitialCheck,ThreadRunCheck,ThreadSleepInTestsCheck,ThreadWaitCallCheck,ToArrayCheck,WaitInWhileLoopCheck,WaitOnConditionCheck,XmlDeserializationCheck,XPathUsageCheck
public abstract class AbstractMethodDetection extends org.sonar.plugins.java.api.IssuableSubscriptionVisitor
-
-
Constructor Summary
Constructors Constructor Description AbstractMethodDetection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<org.sonar.java.matcher.MethodMatcher>getMethodInvocationMatchers()List<org.sonar.plugins.java.api.tree.Tree.Kind>nodesToVisit()protected voidonConstructorFound(org.sonar.plugins.java.api.tree.NewClassTree newClassTree)protected voidonMethodInvocationFound(org.sonar.plugins.java.api.tree.MethodInvocationTree mit)protected voidonMethodReferenceFound(org.sonar.plugins.java.api.tree.MethodReferenceTree methodReferenceTree)voidvisitNode(org.sonar.plugins.java.api.tree.Tree tree)-
Methods inherited from class org.sonar.plugins.java.api.IssuableSubscriptionVisitor
addIssue, addIssueOnFile, reportIssue, reportIssue, reportIssue, scanTree
-
-
-
-
Method Detail
-
nodesToVisit
public List<org.sonar.plugins.java.api.tree.Tree.Kind> nodesToVisit()
- Specified by:
nodesToVisitin classorg.sonar.java.ast.visitors.SubscriptionVisitor
-
visitNode
public void visitNode(org.sonar.plugins.java.api.tree.Tree tree)
- Overrides:
visitNodein classorg.sonar.java.ast.visitors.SubscriptionVisitor
-
getMethodInvocationMatchers
protected abstract List<org.sonar.java.matcher.MethodMatcher> getMethodInvocationMatchers()
-
onMethodInvocationFound
protected void onMethodInvocationFound(org.sonar.plugins.java.api.tree.MethodInvocationTree mit)
-
onConstructorFound
protected void onConstructorFound(org.sonar.plugins.java.api.tree.NewClassTree newClassTree)
-
onMethodReferenceFound
protected void onMethodReferenceFound(org.sonar.plugins.java.api.tree.MethodReferenceTree methodReferenceTree)
-
-