com.android.tools.lint.detector.api
Enum Scope

java.lang.Object
  extended by java.lang.Enum<Scope>
      extended by com.android.tools.lint.detector.api.Scope
All Implemented Interfaces:
Serializable, Comparable<Scope>

public enum Scope
extends Enum<Scope>

The scope of a detector is the set of files a detector must consider when performing its analysis. This can be used to determine when issues are potentially obsolete, whether a detector should re-run on a file save, etc.


Enum Constant Summary
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
PROGUARD
          The analysis considers the Proguard configuration file
RESOURCE_FILE
          The analysis only considers a single XML resource file at a time.
 
Field Summary
static EnumSet<Scope> ALL
          All scopes: running lint on a project will check these scopes
static EnumSet<Scope> ALL_RESOURCES_SCOPE
          Scope-set used for detectors which scan all resources
static EnumSet<Scope> JAVA_FILE_SCOPE
          Scope-set used for detectors which are affected by a single Java source file
static EnumSet<Scope> RESOURCE_FILE_SCOPE
          Scope-set used for detectors which are affected by a single resource file
 
Method Summary
static Scope valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RESOURCE_FILE

public static final Scope RESOURCE_FILE
The analysis only considers a single XML resource file at a time.

Issues which are only affected by a single resource file can be checked for incrementally when a file is edited.


ALL_RESOURCE_FILES

public static final Scope ALL_RESOURCE_FILES
The analysis considers all the resource file. This scope must not be used in conjunction with RESOURCE_FILE; an issue scope is either considering just a single resource file or all the resources, not both.


JAVA_FILE

public static final Scope JAVA_FILE
The analysis only considers a single Java source file at a time.

Issues which are only affected by a single Java source file can be checked for incrementally when a Java source file is edited.


ALL_JAVA_FILES

public static final Scope ALL_JAVA_FILES
The analysis considers all the Java source files together.

This flag is mutually exclusive with JAVA_FILE.


CLASS_FILE

public static final Scope CLASS_FILE
The analysis only considers a single Java class file at a time.

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.


MANIFEST

public static final Scope MANIFEST
The analysis considers the manifest file


PROGUARD

public static final Scope PROGUARD
The analysis considers the Proguard configuration file


JAVA_LIBRARIES

public static final Scope JAVA_LIBRARIES
The analysis considers classes in the libraries for this project.

Field Detail

ALL

public static final EnumSet<Scope> ALL
All scopes: running lint on a project will check these scopes


RESOURCE_FILE_SCOPE

public static final EnumSet<Scope> RESOURCE_FILE_SCOPE
Scope-set used for detectors which are affected by a single resource file


ALL_RESOURCES_SCOPE

public static final EnumSet<Scope> ALL_RESOURCES_SCOPE
Scope-set used for detectors which scan all resources


JAVA_FILE_SCOPE

public static final EnumSet<Scope> JAVA_FILE_SCOPE
Scope-set used for detectors which are affected by a single Java source file

Method Detail

values

public static Scope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Scope c : Scope.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Scope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2008-2012. All Rights Reserved.