|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Detector.XmlScanner
Specialized interface for detectors that scan XML files
Field Summary | |
---|---|
static java.util.List<java.lang.String> |
ALL
Special marker collection returned by getApplicableElements() or
getApplicableAttributes() to indicate that the check should be
invoked on all elements or all attributes |
Method Summary | |
---|---|
java.util.Collection<java.lang.String> |
getApplicableAttributes()
Returns the list of attributes that this detector wants to analyze. |
java.util.Collection<java.lang.String> |
getApplicableElements()
Returns the list of elements that this detector wants to analyze. |
void |
visitAttribute(XmlContext context,
org.w3c.dom.Attr attribute)
Visit the given attribute. |
void |
visitDocument(XmlContext context,
org.w3c.dom.Document document)
Visit the given document. |
void |
visitElement(XmlContext context,
org.w3c.dom.Element element)
Visit the given element. |
void |
visitElementAfter(XmlContext context,
org.w3c.dom.Element element)
Visit the given element after its children have been analyzed. |
Field Detail |
---|
@NonNull static final java.util.List<java.lang.String> ALL
getApplicableElements()
or
getApplicableAttributes()
to indicate that the check should be
invoked on all elements or all attributes
Method Detail |
---|
void visitDocument(@NonNull XmlContext context, @NonNull org.w3c.dom.Document document)
context
- information about the document being analyzeddocument
- the document to examinevoid visitElement(@NonNull XmlContext context, @NonNull org.w3c.dom.Element element)
context
- information about the document being analyzedelement
- the element to examinevoid visitElementAfter(@NonNull XmlContext context, @NonNull org.w3c.dom.Element element)
context
- information about the document being analyzedelement
- the element to examinevoid visitAttribute(@NonNull XmlContext context, @NonNull org.w3c.dom.Attr attribute)
context
- information about the document being analyzedattribute
- the attribute node to examine@Nullable java.util.Collection<java.lang.String> getApplicableElements()
visitElement(com.android.tools.lint.detector.api.XmlContext, org.w3c.dom.Element)
method) for each matching element in the document.
If this method returns null, and getApplicableAttributes()
also returns
null, then the visitDocument(com.android.tools.lint.detector.api.XmlContext, org.w3c.dom.Document)
method will be called instead.
ALL
marker to indicate that every single
element should be analyzed.@Nullable java.util.Collection<java.lang.String> getApplicableAttributes()
visitAttribute(com.android.tools.lint.detector.api.XmlContext, org.w3c.dom.Attr)
method) for each matching attribute in the document.
If this method returns null, and getApplicableElements()
also returns
null, then the visitDocument(com.android.tools.lint.detector.api.XmlContext, org.w3c.dom.Document)
method will be called instead.
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 |