edu.umd.cs.findbugs
public class Project extends Object implements XMLWriteable
Field Summary | |
---|---|
static String | RELATIVE_PATHS |
static String | UNNAMED_PROJECT
Constant used to name anonymous projects. |
Constructor Summary | |
---|---|
Project()
Create an anonymous project. |
Method Summary | |
---|---|
boolean | addAuxClasspathEntry(String auxClasspathEntry)
Add an auxiliary classpath entry
|
boolean | addFile(String fileName)
Add a file to the project.
|
boolean | addSourceDir(String dirName)
Add a source directory to the project. |
void | addTimestamp(long timestamp) |
Project | duplicate()
Return an exact copy of this Project. |
String | getAuxClasspathEntry(int n)
Get the n'th auxiliary classpath entry. |
List<String> | getAuxClasspathEntryList()
Return the list of aux classpath entries. |
String | getFile(int num)
Get the given file in the list of project files.
|
String[] | getFileArray()
Get project files as an array of Strings. |
int | getFileCount()
Get the number of files in the project.
|
List<String> | getFileList()
Get the list of files, directories, and zip files in the project. |
List<String> | getImplicitClasspathEntryList()
Return the list of implicit classpath entries. |
int | getNumAuxClasspathEntries()
Get the number of auxiliary classpath entries. |
int | getNumSourceDirs()
Get the number of source directories in the project.
|
boolean | getOption(String option)
Retrieve the Options value.
|
String | getProjectName() |
String | getSourceDir(int num)
Get the given source directory.
|
String[] | getSourceDirArray()
Get source dirs as an array of Strings. |
List<String> | getSourceDirList()
Get the source dir list. |
Filter | getSuppressionFilter() |
long | getTimestamp() |
boolean | isModified()
Return whether or not this Project has unsaved modifications. |
String | projectNameFromProjectFileName() |
void | read(String inputFile)
Read the project from an input file.
|
static Project | readXML(File f) |
void | removeAuxClasspathEntry(int n)
Remove the n'th auxiliary classpath entry. |
void | removeFile(int num)
Remove file at the given index in the list of project files
|
void | removeSourceDir(int num)
Remove source directory at given index.
|
void | setCurrentWorkingDirectory(File f) |
void | setModified(boolean isModified)
Set whether or not this Project has unsaved modifications. |
void | setProjectName(String projectName) |
void | setSuppressionFilter(Filter suppressionFilter) |
void | setTimestamp(long timestamp) |
static String | transformFilename(String fileName)
Transform a user-entered filename into a proper filename,
by adding the ".fb" file extension if it isn't already present. |
void | writeXML(File f) |
void | writeXML(XMLOutput xmlOutput) |
Parameters: auxClasspathEntry the entry
Returns: true if the entry was added successfully, or false if the given entry is already in the list
Parameters: fileName the file to add
Returns: true if the file was added, or false if the file was already present
Parameters: dirName the directory to add
Returns: true if the source directory was added, or false if the source directory was already present
Parameters: num the number of the file in the list of project files
Returns: the name of the file
Returns: the number of files in the project
Deprecated: FindBugs2 and ClassPathBuilder take care of this automatically
Return the list of implicit classpath entries. The implicit classpath is computed from the closure of the set of jar files that are referenced by the"Class-Path"
attribute
of the manifest of the any jar file that is part of this project
or by the "Class-Path"
attribute of any directly or
indirectly referenced jar. The referenced jar files that exist
are the list of implicit classpath entries.
Returns: the number of source directories in the project
Parameters: option the name of option to get
Returns: the value of the option
Returns: Returns the projectName.
Parameters: num the number of the source directory
Returns: the source directory
Returns: Returns the suppressionFilter.
Returns: Returns the timestamp.
Parameters: inputFile name of the input file to read the project from
Throws: IOException if an error occurs while reading
Parameters: num index of the file to remove in the list of project files
Parameters: num index of the source directory to remove
Parameters: projectName The projectName to set.
Parameters: suppressionFilter The suppressionFilter to set.
Parameters: timestamp The timestamp to set.