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

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

public class Lint
extends Object

Analyzes Android projects and files


Constructor Summary
Lint(IssueRegistry registry, LintClient client)
          Creates a new Lint
 
Method Summary
 void addLintListener(LintListener listener)
          Adds a listener to be notified of lint progress
 void analyze(List<File> files, EnumSet<Scope> scope)
          Analyze the given file (which can point to an Android project).
 void cancel()
          Cancels the current lint run as soon as possible
 void removeLintListener(LintListener listener)
          Removes a listener such that it is no longer notified of progress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lint

public Lint(IssueRegistry registry,
            LintClient client)
Creates a new Lint

Parameters:
registry - The registry containing issues to be checked
client - the tool wrapping the analyzer, such as an IDE or a CLI
Method Detail

cancel

public void cancel()
Cancels the current lint run as soon as possible


analyze

public void analyze(List<File> files,
                    EnumSet<Scope> scope)
Analyze the given file (which can point to an Android project). Issues found are reported to the associated LintClient.

Parameters:
files - the files and directories to be analyzed
scope - the scope of the analysis; detectors with a wider scope will not be run. If null, the scope will be inferred from the files.

addLintListener

public void addLintListener(LintListener listener)
Adds a listener to be notified of lint progress

Parameters:
listener - the listener to be added

removeLintListener

public void removeLintListener(LintListener listener)
Removes a listener such that it is no longer notified of progress

Parameters:
listener - the listener to be removed


Copyright © 2008-2012. All Rights Reserved.