@Beta public enum Scope extends java.lang.Enum<Scope>
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.
Enum Constant and Description |
---|
ALL_CLASS_FILES
The analysis considers all the Java class files together.
|
ALL_JAVA_FILES
The analysis considers all the Java source files together.
|
ALL_RESOURCE_FILES
The analysis considers all the resource file.
|
CLASS_FILE
The analysis only considers a single Java class file at a time.
|
JAVA_FILE
The analysis only considers a single Java source file at a time.
|
JAVA_LIBRARIES
The analysis considers classes in the libraries for this project.
|
MANIFEST
The analysis considers the manifest file
|
OTHER
Scope for other files.
|
PROGUARD_FILE
The analysis considers the Proguard configuration file
|
RESOURCE_FILE
The analysis only considers a single XML resource file at a time.
|
Modifier and Type | Field and Description |
---|---|
static java.util.EnumSet<Scope> |
ALL
All scopes: running lint on a project will check these scopes
|
static java.util.EnumSet<Scope> |
ALL_RESOURCES_SCOPE
Scope-set used for detectors which scan all resources
|
static java.util.EnumSet<Scope> |
CLASS_AND_ALL_RESOURCE_FILES
Scope-set used for analyzing individual class files and all resource files
|
static java.util.EnumSet<Scope> |
CLASS_FILE_SCOPE
Scope-set used for detectors which are affected by a single Java class file
|
static java.util.EnumSet<Scope> |
JAVA_AND_RESOURCE_FILES
Scope-set used for detectors which are affected by single XML and Java source files
|
static java.util.EnumSet<Scope> |
JAVA_FILE_SCOPE
Scope-set used for detectors which are affected by a single Java source file
|
static java.util.EnumSet<Scope> |
JAVA_LIBRARY_SCOPE
Scope-set used for detectors which are affected by Java libraries
|
static java.util.EnumSet<Scope> |
MANIFEST_SCOPE
Scope-set used for detectors which are affected by the manifest only
|
static java.util.EnumSet<Scope> |
OTHER_SCOPE
Scope-set used for detectors which correspond to some other context
|
static java.util.EnumSet<Scope> |
PROGUARD_SCOPE
Scope-set used for detectors which are affected by a single ProGuard class file
|
static java.util.EnumSet<Scope> |
RESOURCE_FILE_SCOPE
Scope-set used for detectors which are affected by a single resource file
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkSingleFile(java.util.EnumSet<Scope> scopes)
Returns true if the given scope set corresponds to scanning a single file
rather than a whole project
|
static java.util.EnumSet<Scope> |
infer(java.util.Collection<Project> projects)
Infers a suitable scope to use from the given projects to be analyzed
|
static java.util.EnumSet<Scope> |
intersect(java.util.EnumSet<Scope> scope1,
java.util.EnumSet<Scope> scope2)
Returns the intersection of two scope sets
|
static Scope |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Scope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Scope RESOURCE_FILE
Issues which are only affected by a single resource file can be checked for incrementally when a file is edited.
public static final Scope ALL_RESOURCE_FILES
RESOURCE_FILE
; an issue scope is
either considering just a single resource file or all the resources, not
both.public static final Scope JAVA_FILE
Issues which are only affected by a single Java source file can be checked for incrementally when a Java source file is edited.
public static final Scope ALL_JAVA_FILES
This flag is mutually exclusive with JAVA_FILE
.
public static final Scope CLASS_FILE
Issues which are only affected by a single Java class file can be checked for incrementally when a Java source file is edited and then recompiled.
public static final Scope ALL_CLASS_FILES
This flag is mutually exclusive with CLASS_FILE
.
public static final Scope MANIFEST
public static final Scope PROGUARD_FILE
public static final Scope JAVA_LIBRARIES
public static final Scope OTHER
Detector.run(Context)
} on the detectors unconditionally.public static final java.util.EnumSet<Scope> ALL
public static final java.util.EnumSet<Scope> RESOURCE_FILE_SCOPE
public static final java.util.EnumSet<Scope> ALL_RESOURCES_SCOPE
public static final java.util.EnumSet<Scope> JAVA_FILE_SCOPE
public static final java.util.EnumSet<Scope> CLASS_FILE_SCOPE
public static final java.util.EnumSet<Scope> MANIFEST_SCOPE
public static final java.util.EnumSet<Scope> OTHER_SCOPE
public static final java.util.EnumSet<Scope> PROGUARD_SCOPE
public static final java.util.EnumSet<Scope> JAVA_AND_RESOURCE_FILES
public static final java.util.EnumSet<Scope> CLASS_AND_ALL_RESOURCE_FILES
public static final java.util.EnumSet<Scope> JAVA_LIBRARY_SCOPE
public static Scope[] values()
for (Scope c : Scope.values()) System.out.println(c);
public static Scope valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static boolean checkSingleFile(@NonNull java.util.EnumSet<Scope> scopes)
scopes
- the scope set to check@NonNull public static java.util.EnumSet<Scope> intersect(@NonNull java.util.EnumSet<Scope> scope1, @NonNull java.util.EnumSet<Scope> scope2)
scope1
- the first set to intersectscope2
- the second set to intersect