com.android.tools.lint.client.api
Class JavaVisitor

java.lang.Object
  extended by com.android.tools.lint.client.api.JavaVisitor

public class JavaVisitor
extends java.lang.Object

Specialized visitor for running detectors on a Java AST. It operates in three phases:

  1. First, it computes a set of maps where it generates a map from each significant AST attribute (such as method call names) to a list of detectors to consult whenever that attribute is encountered. Examples of "attributes" are method names, Android resource identifiers, and general AST node types such as "cast" nodes etc. These are defined on the Detector.JavaScanner interface.
  2. Second, it iterates over the document a single time, delegating to the detectors found at each relevant AST attribute.
  3. Finally, it calls the remaining visitors (those that need to process a whole document on their own).
It also notifies all the detectors before and after the document is processed such that they can do pre- and post-processing.


Method Summary
 void prepare(java.util.List<JavaContext> contexts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

prepare

public void prepare(@NonNull
                    java.util.List<JavaContext> contexts)