|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.Project
public class Project
A project in the GUI. This consists of some number of Jar files to analyze for bugs, and optionally
Field Summary | |
---|---|
static java.lang.String |
RELATIVE_PATHS
|
static java.lang.String |
UNNAMED_PROJECT
Constant used to name anonymous projects. |
Constructor Summary | |
---|---|
Project()
Create an anonymous project. |
Method Summary | |
---|---|
boolean |
addAuxClasspathEntry(java.lang.String auxClasspathEntry)
Add an auxiliary classpath entry |
boolean |
addFile(java.lang.String fileName)
Add a file to the project. |
boolean |
addSourceDir(java.lang.String dirName)
Add a source directory to the project. |
void |
addTimestamp(long timestamp)
|
Project |
duplicate()
Return an exact copy of this Project. |
java.lang.String |
getAuxClasspathEntry(int n)
Get the n'th auxiliary classpath entry. |
java.util.List<java.lang.String> |
getAuxClasspathEntryList()
Return the list of aux classpath entries. |
java.lang.String |
getFile(int num)
Get the given file in the list of project files. |
java.lang.String[] |
getFileArray()
Get project files as an array of Strings. |
int |
getFileCount()
Get the number of files in the project. |
java.util.List<java.lang.String> |
getFileList()
Get the list of files, directories, and zip files in the project. |
java.util.List<java.lang.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(java.lang.String option)
Retrieve the Options value. |
java.lang.String |
getProjectFileName()
Get the project filename. |
java.lang.String |
getSourceDir(int num)
Get the given source directory. |
java.lang.String[] |
getSourceDirArray()
Get source dirs as an array of Strings. |
java.util.List<java.lang.String> |
getSourceDirList()
Get the source dir list. |
long |
getTimestamp()
|
boolean |
isModified()
Return whether or not this Project has unsaved modifications. |
void |
read(java.lang.String inputFile)
Read the project from an input file. |
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 |
setModified(boolean isModified)
Set whether or not this Project has unsaved modifications. |
void |
setProjectFileName(java.lang.String projectFileName)
Set the project filename. |
void |
setTimestamp(long timestamp)
|
java.lang.String |
toString()
Convert to a string in a nice (displayable) format. |
static java.lang.String |
transformFilename(java.lang.String fileName)
Transform a user-entered filename into a proper filename, by adding the ".fb" file extension if it isn't already present. |
void |
write(java.lang.String outputFile,
boolean useRelativePaths,
java.lang.String relativeBase)
Save the project to an output file. |
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UNNAMED_PROJECT
public static final java.lang.String RELATIVE_PATHS
Constructor Detail |
---|
public Project()
Method Detail |
---|
public Project duplicate()
public boolean isModified()
public void setModified(boolean isModified)
public java.lang.String getProjectFileName()
public void setProjectFileName(java.lang.String projectFileName)
projectFileName
- the new filenamepublic boolean addFile(java.lang.String fileName)
fileName
- the file to add
public boolean addSourceDir(java.lang.String dirName)
dirName
- the directory to add
public boolean getOption(java.lang.String option)
option
- the name of option to get
public int getFileCount()
public java.lang.String getFile(int num)
num
- the number of the file in the list of project files
public void removeFile(int num)
num
- index of the file to remove in the list of project filespublic java.util.List<java.lang.String> getFileList()
public int getNumSourceDirs()
public java.lang.String getSourceDir(int num)
num
- the number of the source directory
public void removeSourceDir(int num)
num
- index of the source directory to removepublic java.lang.String[] getFileArray()
public java.lang.String[] getSourceDirArray()
public java.util.List<java.lang.String> getSourceDirList()
public boolean addAuxClasspathEntry(java.lang.String auxClasspathEntry)
auxClasspathEntry
- the entry
public int getNumAuxClasspathEntries()
public java.lang.String getAuxClasspathEntry(int n)
public void removeAuxClasspathEntry(int n)
public java.util.List<java.lang.String> getAuxClasspathEntryList()
public java.util.List<java.lang.String> getImplicitClasspathEntryList()
"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.
public void write(java.lang.String outputFile, boolean useRelativePaths, java.lang.String relativeBase) throws java.io.IOException
outputFile
- name of output fileuseRelativePaths
- true if the project should be written
using only relative pathsrelativeBase
- if useRelativePaths is true,
this file is taken as the base directory in terms of which
all files should be made relative
java.io.IOException
- if an error occurs while writingpublic void read(java.lang.String inputFile) throws java.io.IOException
inputFile
- name of the input file to read the project from
java.io.IOException
- if an error occurs while readingpublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String transformFilename(java.lang.String fileName)
public void writeXML(XMLOutput xmlOutput) throws java.io.IOException
XMLWriteable
writeXML
in interface XMLWriteable
xmlOutput
- the XMLOutput for the document
java.io.IOException
public void setTimestamp(long timestamp)
timestamp
- The timestamp to set.public void addTimestamp(long timestamp)
public long getTimestamp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |