|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.tools.lint.Reporter
@Beta public abstract class Reporter
A reporter is an output generator for lint warnings
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.
Field Summary | |
---|---|
protected boolean |
mBundleResources
|
protected LintCliClient |
mClient
|
protected java.util.Map<java.lang.String,java.io.File> |
mNameToFile
|
protected java.io.File |
mOutput
|
protected java.io.File |
mResources
|
protected java.util.Map<java.io.File,java.lang.String> |
mResourceUrl
|
protected boolean |
mSimpleFormat
|
protected java.lang.String |
mTitle
|
protected java.util.Map<java.lang.String,java.lang.String> |
mUrlMap
|
Constructor Summary | |
---|---|
protected |
Reporter(LintCliClient client,
java.io.File output)
|
Method Summary | |
---|---|
protected java.lang.String |
addLocalResources(java.net.URL url)
Returns a URL to a local copy of the given resource, or null. |
protected java.lang.String |
getRelativeResourceUrl(java.io.File file)
Returns a URL to a local copy of the given file, or null |
java.lang.String |
getTitle()
|
boolean |
isSimpleFormat()
Returns whether the report should use simple formatting (meaning no JavaScript, embedded images, etc). |
void |
setBundleResources(boolean bundleResources)
Sets whether the report should bundle up resources along with the HTML report. |
void |
setSimpleFormat(boolean simpleFormat)
Sets whether the report should use simple formatting (meaning no JavaScript, embedded images, etc). |
void |
setTitle(java.lang.String title)
Sets the report title |
void |
setUrlMap(java.util.Map<java.lang.String,java.lang.String> urlMap)
Set mapping of path prefixes to corresponding URLs in the HTML report |
abstract void |
write(int errorCount,
int warningCount,
java.util.List<Warning> issues)
Write the given warnings into the report |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final LintCliClient mClient
protected final java.io.File mOutput
protected java.lang.String mTitle
protected boolean mSimpleFormat
protected boolean mBundleResources
protected java.util.Map<java.lang.String,java.lang.String> mUrlMap
protected java.io.File mResources
protected final java.util.Map<java.io.File,java.lang.String> mResourceUrl
protected final java.util.Map<java.lang.String,java.io.File> mNameToFile
Constructor Detail |
---|
protected Reporter(LintCliClient client, java.io.File output)
Method Detail |
---|
public abstract void write(int errorCount, int warningCount, java.util.List<Warning> issues) throws java.io.IOException
errorCount
- the number of errorswarningCount
- the number of warningsissues
- the issues to be reported
java.io.IOException
- if an error occurspublic void setTitle(java.lang.String title)
title
- the title of the reportpublic java.lang.String getTitle()
public void setBundleResources(boolean bundleResources)
setSimpleFormat(boolean)
).
bundleResources
- if true, copy images into a directory relative to
the reportpublic void setSimpleFormat(boolean simpleFormat)
simpleFormat
- whether the formatting should be simplepublic boolean isSimpleFormat()
public void setUrlMap(@Nullable java.util.Map<java.lang.String,java.lang.String> urlMap)
protected java.lang.String getRelativeResourceUrl(java.io.File file)
protected java.lang.String addLocalResources(java.net.URL url)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |