|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.tools.lint.detector.api.Detector
com.android.tools.lint.detector.api.Detector.XmlDetectorAdapter
public abstract static class Detector.XmlDetectorAdapter
Concrete implementation of a detector that is a Detector.XmlScanner
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.android.tools.lint.detector.api.Detector |
|---|
Detector.ClassScanner, Detector.JavaScanner, Detector.XmlDetectorAdapter, Detector.XmlScanner |
| Field Summary |
|---|
| Fields inherited from interface com.android.tools.lint.detector.api.Detector.XmlScanner |
|---|
ALL |
| Constructor Summary | |
|---|---|
Detector.XmlDetectorAdapter()
|
|
| Method Summary | |
|---|---|
boolean |
appliesTo(Context context,
File file)
Returns true if this detector applies to the given file |
Collection<String> |
getApplicableAttributes()
Returns the list of attributes that this detector wants to analyze. |
Collection<String> |
getApplicableElements()
Returns the list of elements that this detector wants to analyze. |
void |
run(Context context)
Runs the detector |
void |
visitAttribute(Context context,
Attr attribute)
Visit the given attribute. |
void |
visitDocument(Context context,
Document document)
Visit the given document. |
void |
visitElement(Context context,
Element element)
Visit the given element. |
void |
visitElementAfter(Context context,
Element element)
Visit the given element after its children have been analyzed. |
| Methods inherited from class com.android.tools.lint.detector.api.Detector |
|---|
afterCheckFile, afterCheckProject, beforeCheckFile, beforeCheckProject, getSpeed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Detector.XmlDetectorAdapter()
| Method Detail |
|---|
public void run(Context context)
Detector
run in class Detectorcontext - the context describing the work to be done
public boolean appliesTo(Context context,
File file)
Detector
appliesTo in class Detector
public void visitDocument(Context context,
Document document)
Detector.XmlScanner
visitDocument in interface Detector.XmlScannercontext - information about the document being analyzeddocument - the document to examine
public void visitElement(Context context,
Element element)
Detector.XmlScanner
visitElement in interface Detector.XmlScannercontext - information about the document being analyzedelement - the element to examine
public void visitElementAfter(Context context,
Element element)
Detector.XmlScanner
visitElementAfter in interface Detector.XmlScannercontext - information about the document being analyzedelement - the element to examine
public void visitAttribute(Context context,
Attr attribute)
Detector.XmlScanner
visitAttribute in interface Detector.XmlScannercontext - information about the document being analyzedattribute - the attribute node to examinepublic Collection<String> getApplicableElements()
Detector.XmlScannerDetector.XmlScanner.visitElement(com.android.tools.lint.detector.api.Context, org.w3c.dom.Element) method) for each matching element in the document.
If this method returns null, and Detector.XmlScanner.getApplicableAttributes() also returns
null, then the Detector.XmlScanner.visitDocument(com.android.tools.lint.detector.api.Context, org.w3c.dom.Document) method will be called instead.
getApplicableElements in interface Detector.XmlScannerDetector.XmlScanner.ALL marker to indicate that every single
element should be analyzed.public Collection<String> getApplicableAttributes()
Detector.XmlScannerDetector.XmlScanner.visitAttribute(com.android.tools.lint.detector.api.Context, org.w3c.dom.Attr) method) for each matching attribute in the document.
If this method returns null, and Detector.XmlScanner.getApplicableElements() also returns
null, then the Detector.XmlScanner.visitDocument(com.android.tools.lint.detector.api.Context, org.w3c.dom.Document) method will be called instead.
getApplicableAttributes in interface Detector.XmlScannerDetector.XmlScanner.ALL marker to indicate that every single
attribute should be analyzed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||