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:
JavaCheck,JavaFileScanner
- Direct Known Subclasses:
AbstractInSynchronizeChecker,AbstractPrintfChecker,AccessibilityChangeCheck,AESAlgorithmCheck,AndroidBroadcastingCheck,AndroidExternalStorageCheck,ArrayHashCodeAndToStringCheck,ArraysAsListOfPrimitiveToStreamCheck,AssertionArgumentOrderCheck,AssertionFailInCatchBlockCheck,AssertionsWithoutMessageCheck,AvoidDESCheck,BasicAuthCheck,BooleanLiteralInAssertionsCheck,CallToFileDeleteOnExitMethodCheck,CipherBlockChainingCheck,ClassComparedByNameCheck,CollectInsteadOfForeachCheck,CollectionInappropriateCallsCheck,CookieDomainCheck,CookieShouldNotContainSensitiveDataCheck,CryptographicKeySizeCheck,DataEncryptionCheck,DataHashingCheck,DateAndTimesCheck,DateFormatWeekYearCheck,DateUtilsTruncateCheck,DefaultEncodingUsageCheck,DeprecatedHashAlgorithmCheck,DisallowedConstructorCheck,DisallowedMethodCheck,DynamicClassLoadCheck,EmailHotspotCheck,EmptyDatabasePasswordCheck,EnumEqualCheck,EnvVariablesHotspotCheck,EqualsOnAtomicClassCheck,FilesExistsJDK8Check,GetClassLoaderCheck,GetRequestedSessionIdCheck,HttpRefererCheck,IgnoredOperationStatusCheck,InappropriateRegexpCheck,IntegerToHexStringCheck,InvalidDateValuesCheck,JdbcDriverExplicitLoadingCheck,LDAPAuthenticatedConnectionCheck,LDAPDeserializationCheck,LogConfigurationCheck,LongBitsToDoubleOnIntCheck,NioFileDeleteCheck,NotifyCheck,ObjectCreatedOnlyToCallGetClassCheck,ObjectDeserializationCheck,PopulateBeansCheck,PredictableSeedCheck,PreferStreamAnyMatchCheck,PreparedStatementAndResultSetCheck,ReceivingIntentsCheck,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
public abstract class AbstractMethodDetection extends IssuableSubscriptionVisitor
-
-
Field Summary
-
Fields inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
context
-
-
Constructor Summary
Constructors Constructor Description AbstractMethodDetection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<MethodMatcher>getMethodInvocationMatchers()List<Tree.Kind>nodesToVisit()protected voidonConstructorFound(NewClassTree newClassTree)protected voidonMethodInvocationFound(MethodInvocationTree mit)protected voidonMethodReferenceFound(MethodReferenceTree methodReferenceTree)voidvisitNode(Tree tree)-
Methods inherited from class org.sonar.plugins.java.api.IssuableSubscriptionVisitor
addIssue, addIssueOnFile, reportIssue, reportIssue, reportIssue, scanTree
-
Methods inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
hasSemantic, leaveFile, leaveNode, scanFile, setContext, visitToken, visitTrivia
-
-
-
-
Method Detail
-
nodesToVisit
public List<Tree.Kind> nodesToVisit()
- Specified by:
nodesToVisitin classSubscriptionVisitor
-
visitNode
public void visitNode(Tree tree)
- Overrides:
visitNodein classSubscriptionVisitor
-
getMethodInvocationMatchers
protected abstract List<MethodMatcher> getMethodInvocationMatchers()
-
onMethodInvocationFound
protected void onMethodInvocationFound(MethodInvocationTree mit)
-
onConstructorFound
protected void onConstructorFound(NewClassTree newClassTree)
-
onMethodReferenceFound
protected void onMethodReferenceFound(MethodReferenceTree methodReferenceTree)
-
-