com.android.tools.lint.client.api
Class LintRequest

java.lang.Object
  extended by com.android.tools.lint.client.api.LintRequest

@Beta
public class LintRequest
extends java.lang.Object

Information about a request to run lint

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.


Constructor Summary
LintRequest(LintClient client, java.util.List<java.io.File> files)
          Creates a new LintRequest, to be passed to a LintDriver
 
Method Summary
 LintClient getClient()
          Returns the lint client requesting the lint check
 java.util.List<java.io.File> getFiles()
          Returns the set of files to check with lint.
 java.util.EnumSet<Scope> getScope()
          Sets the scope to use; lint checks which require a wider scope set will be ignored
 java.lang.Boolean isReleaseMode()
          Returns true if lint is invoked as part of a release mode build, false if it is part of a debug mode build, and null if the release mode is not known
 LintRequest setReleaseMode(java.lang.Boolean releaseMode)
          Sets the release mode.
 LintRequest setScope(java.util.EnumSet<Scope> scope)
          Sets the scope to use; lint checks which require a wider scope set will be ignored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LintRequest

public LintRequest(@NonNull
                   LintClient client,
                   @NonNull
                   java.util.List<java.io.File> files)
Creates a new LintRequest, to be passed to a LintDriver

Parameters:
client - the tool wrapping the analyzer, such as an IDE or a CLI
files - the set of files to check with lint. This can reference Android projects, or directories containing Android projects, or individual XML or Java files (typically for incremental IDE analysis).
Method Detail

getClient

@NonNull
public LintClient getClient()
Returns the lint client requesting the lint check

Returns:
the client, never null

getFiles

@NonNull
public java.util.List<java.io.File> getFiles()
Returns the set of files to check with lint. This can reference Android projects, or directories containing Android projects, or individual XML or Java files (typically for incremental IDE analysis).

Returns:
the set of files to check, should not be empty

getScope

@Nullable
public java.util.EnumSet<Scope> getScope()
Sets the scope to use; lint checks which require a wider scope set will be ignored

Returns:
the scope to use, or null to use the default

setScope

@NonNull
public LintRequest setScope(@Nullable
                                    java.util.EnumSet<Scope> scope)
Sets the scope to use; lint checks which require a wider scope set will be ignored

Parameters:
scope - the scope
Returns:
this, for constructor chaining

isReleaseMode

@Nullable
public java.lang.Boolean isReleaseMode()
Returns true if lint is invoked as part of a release mode build, false if it is part of a debug mode build, and null if the release mode is not known

Returns:
true if this lint is running in release mode, null if not known

setReleaseMode

@NonNull
public LintRequest setReleaseMode(@Nullable
                                          java.lang.Boolean releaseMode)
Sets the release mode. Use true if lint is invoked as part of a release mode build, false if it is part of a debug mode build, and null if the release mode is not known

Parameters:
releaseMode - true if this lint is running in release mode, null if not known
Returns:
this, for constructor chaining