|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.android.tools.lint.detector.api.Detector com.android.tools.lint.detector.api.ResourceXmlDetector
@Beta public abstract class ResourceXmlDetector
Specialized detector intended for XML resources. Detectors that apply to XML resources should extend this detector instead since it provides special iteration hooks that are more efficient.
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.android.tools.lint.detector.api.Detector |
---|
Detector.ClassScanner, Detector.GradleScanner, Detector.JavaScanner, Detector.OtherFileScanner, Detector.XmlScanner |
Field Summary |
---|
Fields inherited from interface com.android.tools.lint.detector.api.Detector.XmlScanner |
---|
ALL |
Constructor Summary | |
---|---|
ResourceXmlDetector()
|
Method Summary | |
---|---|
boolean |
appliesTo(Context context,
java.io.File file)
Returns true if this detector applies to the given file |
boolean |
appliesTo(com.android.resources.ResourceFolderType folderType)
Returns whether this detector applies to the given folder type. |
void |
run(Context context)
Runs the detector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.android.tools.lint.detector.api.Detector.XmlScanner |
---|
getApplicableAttributes, getApplicableElements, visitAttribute, visitDocument, visitElement, visitElementAfter |
Constructor Detail |
---|
public ResourceXmlDetector()
Method Detail |
---|
public boolean appliesTo(@NonNull Context context, @NonNull java.io.File file)
Detector
appliesTo
in class Detector
context
- the context to checkfile
- the file in the context to check
public boolean appliesTo(@NonNull com.android.resources.ResourceFolderType folderType)
folderType
- the folder type to be visited
public void run(@NonNull Context context)
Detector
Detector.XmlScanner
and Detector.JavaScanner
, where
there are specialized analysis methods instead such as
Detector.XmlScanner.visitElement(XmlContext, Element)
.
run
in class Detector
context
- the context describing the work to be done
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |