public class JavaPerformanceDetector
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 java.lang.String |
CLASS_CANVAS |
static com.android.tools.lint.detector.api.Issue |
PAINT_ALLOC
Allocating objects during a paint method
|
static com.android.tools.lint.detector.api.Issue |
USE_SPARSE_ARRAY
Using HashMaps where SparseArray would be better
|
static com.android.tools.lint.detector.api.Issue |
USE_VALUE_OF
Using
new Integer() instead of the more efficient Integer.valueOf |
| Constructor and Description |
|---|
JavaPerformanceDetector()
Constructs a new
JavaPerformanceDetector check |
| Modifier and Type | Method and Description |
|---|---|
com.intellij.psi.JavaElementVisitor |
createPsiVisitor(com.android.tools.lint.detector.api.JavaContext context) |
java.util.List<java.lang.Class<? extends com.intellij.psi.PsiElement>> |
getApplicablePsiTypes() |
static java.lang.String |
getReplacedType(java.lang.String message,
com.android.tools.lint.detector.api.TextFormat format)
For an error message for an
USE_VALUE_OF issue reported by this detector,
returns the type being replaced. |
afterCheckFile, afterCheckLibraryProject, afterCheckProject, applicableSuperClasses, appliesTo, appliesTo, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkBinaryResource, checkCall, checkClass, checkClass, checkClass, checkFolder, checkInstruction, createJavaVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableConstructorTypes, getApplicableElements, getApplicableFiles, getApplicableMethodNames, getApplicableNodeTypes, getApplicableReferenceNames, getSpeed, getSpeed, run, visitAttribute, visitBuildScript, visitConstructor, visitConstructor, visitDocument, visitElement, visitElementAfter, visitMethod, visitMethod, visitReference, visitResourceReference, visitResourceReferenceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicableSuperClasses, appliesToResourceRefs, checkClass, getApplicableConstructorTypes, getApplicableMethodNames, getApplicableReferenceNames, visitConstructor, visitMethod, visitReference, visitResourceReferencepublic static final com.android.tools.lint.detector.api.Issue PAINT_ALLOC
public static final com.android.tools.lint.detector.api.Issue USE_SPARSE_ARRAY
public static final com.android.tools.lint.detector.api.Issue USE_VALUE_OF
new Integer() instead of the more efficient Integer.valueOfpublic static final java.lang.String CLASS_CANVAS
public JavaPerformanceDetector()
JavaPerformanceDetector checkpublic java.util.List<java.lang.Class<? extends com.intellij.psi.PsiElement>> getApplicablePsiTypes()
getApplicablePsiTypes in interface com.android.tools.lint.detector.api.Detector.JavaPsiScannergetApplicablePsiTypes in class com.android.tools.lint.detector.api.Detectorpublic com.intellij.psi.JavaElementVisitor createPsiVisitor(@NonNull
com.android.tools.lint.detector.api.JavaContext context)
createPsiVisitor in interface com.android.tools.lint.detector.api.Detector.JavaPsiScannercreatePsiVisitor in class com.android.tools.lint.detector.api.Detector@Nullable
public static java.lang.String getReplacedType(@NonNull
java.lang.String message,
@NonNull
com.android.tools.lint.detector.api.TextFormat format)
USE_VALUE_OF issue reported by this detector,
returns the type being replaced. Intended to use for IDE quickfix implementations.