|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.umd.cs.findbugs.BugCollection
public abstract class BugCollection
Abstract base class for collections of BugInstance objects and error messages associated with analysis. Supports reading and writing XML files.
BugInstance| Field Summary | |
|---|---|
(package private) static java.lang.String |
ANALYSIS_ERROR_ELEMENT_NAME
|
(package private) static java.lang.String |
APP_CLASS_ELEMENT_NAME
|
(package private) static java.lang.String |
ERRORS_ELEMENT_NAME
|
(package private) static java.lang.String |
MISSING_CLASS_ELEMENT_NAME
|
(package private) static java.lang.String |
PROJECT_ELEMENT_NAME
|
(package private) static java.lang.String |
ROOT_ELEMENT_NAME
|
(package private) static java.lang.String |
SRCMAP_ELEMENT_NAME
|
(package private) static java.lang.String |
SUMMARY_HTML_ELEMENT_NAME
|
| Constructor Summary | |
|---|---|
BugCollection()
|
|
| Method Summary | |
|---|---|
abstract boolean |
add(BugInstance bugInstance)
Add a BugInstance to this BugCollection. |
void |
addAll(java.util.Collection<BugInstance> collection)
Add a Collection of BugInstances to this BugCollection object. |
abstract void |
addError(java.lang.String message)
Add an analysis error message. |
abstract void |
addMissingClass(java.lang.String message)
Add a missing class message. |
private void |
checkInputStream(java.io.InputStream in)
|
private void |
doReadXML(java.io.InputStream in,
Project project)
|
abstract java.util.Iterator<java.lang.String> |
errorIterator()
Return an Iterator over error messages. |
abstract java.util.Collection<BugInstance> |
getCollection()
Return the Collection storing the BugInstance objects. |
abstract java.lang.String |
getSummaryHTML()
Get the summary HTML text. |
abstract java.util.Iterator<BugInstance> |
iterator()
Return an Iterator over all the BugInstance objects in the BugCollection. |
abstract java.util.Iterator<java.lang.String> |
missingClassIterator()
Return an Iterator over missing class messages. |
void |
readXML(java.io.File file,
Project project)
Read XML data from given file into this object, populating given Project as a side effect. |
void |
readXML(java.io.InputStream in,
Project project)
Read XML data from given input stream into this object, populating the Project as a side effect. |
void |
readXML(java.lang.String fileName,
Project project)
Read XML data from given file into this object, populating given Project as a side effect. |
abstract boolean |
remove(BugInstance bugInstance)
Remove a BugInstance from this BugCollection. |
abstract void |
setSummaryHTML(java.lang.String html)
Set the summary HTML text. |
org.dom4j.Document |
toDocument(Project project)
Convert the BugCollection into a dom4j Document object. |
void |
writeXML(java.io.File file,
Project project)
Write this BugCollection to a file as XML. |
void |
writeXML(java.io.OutputStream out,
Project project)
Write the BugCollection to given output stream as XML. |
void |
writeXML(java.lang.String fileName,
Project project)
Write this BugCollection to a file as XML. |
void |
writeXML(XMLOutput xmlOutput,
Project project)
Write the BugCollection to an XMLOutput object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final java.lang.String ROOT_ELEMENT_NAME
static final java.lang.String SRCMAP_ELEMENT_NAME
static final java.lang.String PROJECT_ELEMENT_NAME
static final java.lang.String ERRORS_ELEMENT_NAME
static final java.lang.String ANALYSIS_ERROR_ELEMENT_NAME
static final java.lang.String MISSING_CLASS_ELEMENT_NAME
static final java.lang.String SUMMARY_HTML_ELEMENT_NAME
static final java.lang.String APP_CLASS_ELEMENT_NAME
| Constructor Detail |
|---|
public BugCollection()
| Method Detail |
|---|
public void addAll(java.util.Collection<BugInstance> collection)
collection - the Collection of BugInstances to addpublic abstract boolean add(BugInstance bugInstance)
bugInstance - the BugInstance
public abstract boolean remove(BugInstance bugInstance)
bugInstance - the BugInstance
public abstract java.util.Iterator<BugInstance> iterator()
public abstract java.util.Collection<BugInstance> getCollection()
public abstract void addError(java.lang.String message)
message - the error messagepublic abstract void addMissingClass(java.lang.String message)
message - the missing class messagepublic abstract java.util.Iterator<java.lang.String> errorIterator()
public abstract java.util.Iterator<java.lang.String> missingClassIterator()
public abstract void setSummaryHTML(java.lang.String html)
public abstract java.lang.String getSummaryHTML()
public void readXML(java.lang.String fileName,
Project project)
throws java.io.IOException,
org.dom4j.DocumentException
fileName - name of the file to readproject - the Project
java.io.IOException
org.dom4j.DocumentException
public void readXML(java.io.File file,
Project project)
throws java.io.IOException,
org.dom4j.DocumentException
file - the fileproject - the Project
java.io.IOException
org.dom4j.DocumentException
public void readXML(java.io.InputStream in,
Project project)
throws java.io.IOException,
org.dom4j.DocumentException
in - the InputStreamproject - the Project
java.io.IOException
org.dom4j.DocumentException
private void doReadXML(java.io.InputStream in,
Project project)
throws java.io.IOException,
org.dom4j.DocumentException
java.io.IOException
org.dom4j.DocumentException
public void writeXML(java.lang.String fileName,
Project project)
throws java.io.IOException
fileName - the file to write toproject - the Project from which the BugCollection was generated
java.io.IOException
public void writeXML(java.io.File file,
Project project)
throws java.io.IOException
file - the file to write toproject - the Project from which the BugCollection was generated
java.io.IOExceptionpublic org.dom4j.Document toDocument(Project project)
project - the Project from which the BugCollection was generated
public void writeXML(java.io.OutputStream out,
Project project)
throws java.io.IOException
out - the OutputStream to write toproject - the Project from which the BugCollection was generated
java.io.IOException
public void writeXML(XMLOutput xmlOutput,
Project project)
throws java.io.IOException
xmlOutput - the XMLOutput objectproject - the Project from which the BugCollection was generated
java.io.IOException
private void checkInputStream(java.io.InputStream in)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||