public class WrongCallDetector
extends com.android.tools.lint.detector.api.Detector
implements com.android.tools.lint.detector.api.Detector.JavaPsiScanner
com.android.tools.lint.detector.api.Detector.BinaryResourceScanner, com.android.tools.lint.detector.api.Detector.ClassScanner, com.android.tools.lint.detector.api.Detector.GradleScanner, com.android.tools.lint.detector.api.Detector.JavaPsiScanner, com.android.tools.lint.detector.api.Detector.JavaScanner, com.android.tools.lint.detector.api.Detector.OtherFileScanner, com.android.tools.lint.detector.api.Detector.ResourceFolderScanner, com.android.tools.lint.detector.api.Detector.XmlScanner| Modifier and Type | Field and Description |
|---|---|
static com.android.tools.lint.detector.api.Issue |
ISSUE
Calling the wrong method
|
| Constructor and Description |
|---|
WrongCallDetector()
Constructs a new
WrongCallDetector |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getApplicableMethodNames() |
static java.lang.String |
getNewValue(java.lang.String errorMessage,
com.android.tools.lint.detector.api.TextFormat format)
Given an error message produced by this lint detector for the given issue type,
returns the new value to be put into the source code.
|
static java.lang.String |
getOldValue(java.lang.String errorMessage,
com.android.tools.lint.detector.api.TextFormat format)
Given an error message produced by this lint detector for the given issue type,
returns the old value to be replaced in the source code.
|
void |
visitMethod(com.android.tools.lint.detector.api.JavaContext context,
com.intellij.psi.JavaElementVisitor visitor,
com.intellij.psi.PsiMethodCallExpression node,
com.intellij.psi.PsiMethod calledMethod) |
afterCheckFile, afterCheckLibraryProject, afterCheckProject, applicableSuperClasses, appliesTo, appliesTo, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkBinaryResource, checkCall, checkClass, checkClass, checkClass, checkFolder, checkInstruction, createJavaVisitor, createPsiVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableConstructorTypes, getApplicableElements, getApplicableFiles, getApplicableNodeTypes, getApplicablePsiTypes, getApplicableReferenceNames, getSpeed, getSpeed, run, visitAttribute, visitBuildScript, visitConstructor, visitConstructor, visitDocument, visitElement, visitElementAfter, visitMethod, visitReference, visitResourceReference, visitResourceReferenceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicableSuperClasses, appliesToResourceRefs, checkClass, createPsiVisitor, getApplicableConstructorTypes, getApplicablePsiTypes, getApplicableReferenceNames, visitConstructor, visitReference, visitResourceReferencepublic static final com.android.tools.lint.detector.api.Issue ISSUE
public WrongCallDetector()
WrongCallDetector@Nullable public java.util.List<java.lang.String> getApplicableMethodNames()
getApplicableMethodNames in interface com.android.tools.lint.detector.api.Detector.JavaPsiScannergetApplicableMethodNames in class com.android.tools.lint.detector.api.Detectorpublic void visitMethod(@NonNull
com.android.tools.lint.detector.api.JavaContext context,
@Nullable
com.intellij.psi.JavaElementVisitor visitor,
@NonNull
com.intellij.psi.PsiMethodCallExpression node,
@NonNull
com.intellij.psi.PsiMethod calledMethod)
visitMethod in interface com.android.tools.lint.detector.api.Detector.JavaPsiScannervisitMethod in class com.android.tools.lint.detector.api.Detector@Nullable
public static java.lang.String getOldValue(@NonNull
java.lang.String errorMessage,
@NonNull
com.android.tools.lint.detector.api.TextFormat format)
Intended for IDE quickfix implementations.
errorMessage - the error message associated with the errorformat - the format of the error message@Nullable
public static java.lang.String getNewValue(@NonNull
java.lang.String errorMessage,
@NonNull
com.android.tools.lint.detector.api.TextFormat format)
Intended for IDE quickfix implementations.
errorMessage - the error message associated with the errorformat - the format of the error message