com.android.tools.lint.detector.api
Interface Detector.ResourceFolderScanner

Enclosing class:
Detector

public static interface Detector.ResourceFolderScanner

Specialized interface for detectors that scan resource folders (the folder directory itself, not the individual files within it


Method Summary
 boolean appliesTo(com.android.resources.ResourceFolderType folderType)
          Returns whether this detector applies to the given folder type.
 void checkFolder(ResourceContext context, java.lang.String folderName)
          Called for each resource folder
 

Method Detail

checkFolder

void checkFolder(@NonNull
                 ResourceContext context,
                 @NonNull
                 java.lang.String folderName)
Called for each resource folder

Parameters:
context - the context for the resource folder
folderName - the resource folder name

appliesTo

boolean appliesTo(@NonNull
                  com.android.resources.ResourceFolderType folderType)
Returns whether this detector applies to the given folder type. This allows the detectors to be pruned from iteration, so for example when we are analyzing a string value file we don't need to look up detectors related to layout.

Parameters:
folderType - the folder type to be visited
Returns:
true if this detector can apply to resources in folders of the given type