com.android.tools.lint.checks
Class JavaScriptInterfaceDetector

java.lang.Object
  extended by com.android.tools.lint.detector.api.Detector
      extended by com.android.tools.lint.checks.JavaScriptInterfaceDetector
All Implemented Interfaces:
com.android.tools.lint.detector.api.Detector.JavaScanner

public class JavaScriptInterfaceDetector
extends com.android.tools.lint.detector.api.Detector
implements com.android.tools.lint.detector.api.Detector.JavaScanner

Looks for addJavascriptInterface calls on interfaces have been properly annotated with @JavaScriptInterface


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.tools.lint.detector.api.Detector
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.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
 
Field Summary
static com.android.tools.lint.detector.api.Issue ISSUE
          The main issue discovered by this detector
 
Constructor Summary
JavaScriptInterfaceDetector()
          Constructs a new JavaScriptInterfaceDetector check
 
Method Summary
 java.util.List<java.lang.String> getApplicableMethodNames()
           
 com.android.tools.lint.detector.api.Speed getSpeed()
           
 void visitMethod(com.android.tools.lint.detector.api.JavaContext context, lombok.ast.AstVisitor visitor, lombok.ast.MethodInvocation call)
           
 
Methods inherited from class com.android.tools.lint.detector.api.Detector
afterCheckFile, afterCheckLibraryProject, afterCheckProject, applicableSuperClasses, appliesTo, appliesTo, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkBinaryResource, checkCall, checkClass, checkClass, checkFolder, checkInstruction, createJavaVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableConstructorTypes, getApplicableElements, getApplicableFiles, getApplicableNodeTypes, getSpeed, run, visitAttribute, visitBuildScript, visitConstructor, visitDocument, visitElement, visitElementAfter, visitResourceReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.android.tools.lint.detector.api.Detector.JavaScanner
applicableSuperClasses, appliesToResourceRefs, checkClass, createJavaVisitor, getApplicableConstructorTypes, getApplicableNodeTypes, visitConstructor, visitResourceReference
 

Field Detail

ISSUE

public static final com.android.tools.lint.detector.api.Issue ISSUE
The main issue discovered by this detector

Constructor Detail

JavaScriptInterfaceDetector

public JavaScriptInterfaceDetector()
Constructs a new JavaScriptInterfaceDetector check

Method Detail

getSpeed

@NonNull
public com.android.tools.lint.detector.api.Speed getSpeed()
Overrides:
getSpeed in class com.android.tools.lint.detector.api.Detector

getApplicableMethodNames

@Nullable
public java.util.List<java.lang.String> getApplicableMethodNames()
Specified by:
getApplicableMethodNames in interface com.android.tools.lint.detector.api.Detector.JavaScanner
Overrides:
getApplicableMethodNames in class com.android.tools.lint.detector.api.Detector

visitMethod

public void visitMethod(@NonNull
                        com.android.tools.lint.detector.api.JavaContext context,
                        @Nullable
                        lombok.ast.AstVisitor visitor,
                        @NonNull
                        lombok.ast.MethodInvocation call)
Specified by:
visitMethod in interface com.android.tools.lint.detector.api.Detector.JavaScanner
Overrides:
visitMethod in class com.android.tools.lint.detector.api.Detector