|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.tools.lint.client.api.LintClient
public abstract class LintClient
Information about the tool embedding the lint analyzer. IDEs and other tools implementing lint support will extend this to integrate logging, displaying errors, etc.
NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.
| Constructor Summary | |
|---|---|
LintClient()
|
|
| Method Summary | |
|---|---|
Configuration |
getConfiguration(Project project)
Returns a configuration for use by the given project. |
List<File> |
getJavaClassFolders(Project project)
Returns the list of output folders for class files |
List<File> |
getJavaSourceFolders(Project project)
Returns the list of source folders for Java source files |
abstract IDomParser |
getParser()
Returns a IDomParser to use to parse XML |
abstract void |
log(Throwable exception,
String format,
Object... args)
Send an exception to the log |
abstract String |
readFile(File file)
Reads the given text file and returns the content as a string |
Class<? extends Detector> |
replaceDetector(Class<? extends Detector> detectorClass)
Returns an optimal detector, if applicable. |
abstract void |
report(Context context,
Issue issue,
Location location,
String message,
Object data)
Report the given issue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LintClient()
| Method Detail |
|---|
public Configuration getConfiguration(Project project)
By default this method returns a DefaultConfiguration.
project - the project to obtain a configuration for
public abstract void report(Context context,
Issue issue,
Location location,
String message,
Object data)
getConfiguration(Project) has reported the corresponding
issue as enabled and has not filtered out the issue with its
Configuration.ignore(Context, Issue, Location, String, Object) method.
context - the context used by the detector when the issue was foundissue - the issue that was foundlocation - the location of the issuemessage - the associated user messagedata - optional extra data for a discovered issue, or null. The
content depends on the specific issue. Detectors can pass
extra info here which automatic fix tools etc can use to
extract relevant information instead of relying on parsing the
error message text. See each detector for details on which
data if any is supplied for a given issue.
public abstract void log(Throwable exception,
String format,
Object... args)
exception - the exception, possibly nullformat - the error message using String.format(java.lang.String, java.lang.Object...) syntaxargs - any arguments for the format stringpublic Class<? extends Detector> replaceDetector(Class<? extends Detector> detectorClass)
detectorClass - the class of the detector to be replaced
public abstract IDomParser getParser()
IDomParser to use to parse XML
IDomParserpublic abstract String readFile(File file)
file - the file to read
public List<File> getJavaSourceFolders(Project project)
project - the project to look up Java source file locations for
public List<File> getJavaClassFolders(Project project)
project - the project to look up class file locations for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||