public class JavaPerformanceDetector
extends com.android.tools.lint.detector.api.Detector
implements com.android.tools.lint.detector.api.SourceCodeScanner
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.OtherFileScanner, com.android.tools.lint.detector.api.Detector.ResourceFolderScanner, com.android.tools.lint.detector.api.Detector.UastScanner, 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.android.tools.lint.client.api.UElementHandler |
createUastHandler(com.android.tools.lint.detector.api.JavaContext context) |
java.util.List<java.lang.Class<? extends org.jetbrains.uast.UElement>> |
getApplicableUastTypes() |
afterCheckEachProject, afterCheckFile, afterCheckLibraryProject, afterCheckProject, afterCheckRootProject, analyzeCallGraph, applicableAnnotations, applicableSuperClasses, appliesTo, appliesTo, appliesToResourceRefs, beforeCheckEachProject, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, beforeCheckRootProject, checkBinaryResource, checkCall, checkClass, checkClass, checkDslPropertyAssignment, checkFolder, checkInstruction, checkMethodCall, createPsiVisitor, fix, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableConstructorTypes, getApplicableElements, getApplicableFiles, getApplicableMethodNames, getApplicablePsiTypes, getApplicableReferenceNames, getCustomVisitor, getSpeed, isApplicableAnnotationUsage, isCallGraphRequired, run, visitAnnotationUsage, visitAnnotationUsage, visitAttribute, visitBuildScript, visitClass, visitClass, visitConstructor, visitConstructor, visitDocument, visitElement, visitElementAfter, visitMethod, visitMethod, visitMethodCall, visitReference, visitReference, visitResourceReference, visitResourceReferenceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitanalyzeCallGraph, applicableAnnotations, applicableSuperClasses, appliesToResourceRefs, getApplicableConstructorTypes, getApplicableMethodNames, getApplicableReferenceNames, isApplicableAnnotationUsage, isCallGraphRequired, visitAnnotationUsage, visitAnnotationUsage, visitClass, visitClass, visitConstructor, visitMethod, visitMethodCall, 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 org.jetbrains.uast.UElement>> getApplicableUastTypes()
getApplicableUastTypes in interface com.android.tools.lint.detector.api.SourceCodeScannergetApplicableUastTypes in class com.android.tools.lint.detector.api.Detectorpublic com.android.tools.lint.client.api.UElementHandler createUastHandler(@NonNull
com.android.tools.lint.detector.api.JavaContext context)
createUastHandler in interface com.android.tools.lint.detector.api.SourceCodeScannercreateUastHandler in class com.android.tools.lint.detector.api.Detector