|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.tools.lint.detector.api.Project
public class Project
A project contains information about an Android project being scanned for Lint errors.
TODO: Accumulate more project info here, such as the project package name, the minimum and target SDK API levels, etc.
| Constructor Summary | |
|---|---|
Project(LintClient tool,
File dir,
File referenceDir)
Creates a new Project. |
|
| Method Summary | |
|---|---|
void |
addFile(File file)
Adds the given file to the list of files which should be checked in this project. |
boolean |
equals(Object obj)
|
Configuration |
getConfiguration()
Gets the configuration associated with this project |
File |
getDir()
Returns the project root directory |
String |
getDisplayPath(File file)
Returns the relative path of a given file relative to the user specified directory (which is often the project directory but sometimes a higher up directory when a directory tree is being scanned |
List<File> |
getJavaClassFolders()
Returns the list of output folders for class files |
List<File> |
getJavaSourceFolders()
Returns the list of source folders for Java source files |
int |
getMinSdk()
Returns the minimum API level requested by the manifest, or -1 if not specified |
String |
getPackage()
Returns the application package specified by the manifest |
File |
getReferenceDir()
Returns the original user supplied directory where the lint search started. |
String |
getRelativePath(File file)
Returns the relative path of a given file within the current project. |
List<File> |
getSubset()
The list of files to be checked in this project. |
int |
getTargetSdk()
Returns the target API level specified by the manifest, or -1 if not specified |
int |
hashCode()
|
void |
readManifest(Document document)
Initialized the manifest state from the given manifest model |
void |
setConfiguration(Configuration configuration)
Sets the configuration associated with this project |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Project(LintClient tool,
File dir,
File referenceDir)
tool - the tool running the lint checkdir - the root directory of the projectreferenceDir - See getReferenceDir().| Method Detail |
|---|
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic void addFile(File file)
file - the file to be checkedpublic List<File> getSubset()
public List<File> getJavaSourceFolders()
public List<File> getJavaClassFolders()
public String getDisplayPath(File file)
file - the file under this project to check
public String getRelativePath(File file)
file - the file under this project to check
public File getDir()
public File getReferenceDir()
/tmp/foo, and it
finds a project to lint in /tmp/foo/dev/src/project1, then the
dir is /tmp/foo/dev/src/project1 and the
referenceDir is /tmp/foo/.
public Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
configuration - sets the configuration associated with this projectpublic String getPackage()
public int getMinSdk()
public int getTargetSdk()
public void readManifest(Document document)
document - the DOM document for the manifest XML document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||