public interface BugCollection extends java.lang.Iterable<BugInstance>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANALYSIS_ERROR_ELEMENT_NAME |
static java.lang.String |
APP_CLASS_ELEMENT_NAME |
static java.lang.String |
CLASS_HASHES_ELEMENT_NAME |
static java.lang.String |
ERROR_ELEMENT_NAME |
static java.lang.String |
ERROR_EXCEPTION_ELEMENT_NAME |
static java.lang.String |
ERROR_MESSAGE_ELEMENT_NAME |
static java.lang.String |
ERROR_STACK_TRACE_ELEMENT_NAME |
static java.lang.String |
ERRORS_ELEMENT_NAME |
static java.lang.String |
HISTORY_ELEMENT_NAME |
static java.lang.String |
MISSING_CLASS_ELEMENT_NAME |
static java.lang.String |
PROJECT_ELEMENT_NAME |
static java.lang.String |
ROOT_ELEMENT_NAME |
static java.lang.String |
SRCMAP_ELEMENT_NAME |
static java.lang.String |
SUMMARY_HTML_ELEMENT_NAME |
Modifier and Type | Method and Description |
---|---|
boolean |
add(BugInstance bugInstance)
Add a BugInstance to this BugCollection.
|
boolean |
add(BugInstance bugInstance,
boolean updateActiveTime)
Add a BugInstance to this BugCollection.
|
void |
addAppVersion(AppVersion appVersion)
Add an AppVersion representing a version of the analyzed application.
|
void |
addError(AnalysisError error)
Add an analysis error.
|
void |
addError(java.lang.String message)
Add an analysis error.
|
void |
addMissingClass(java.lang.String message)
Add a missing class message.
|
java.util.Iterator<AppVersion> |
appVersionIterator()
Get an Iterator over AppVersions defined in the collection.
|
void |
bugsPopulated() |
void |
clearAppVersions()
Clear all AppVersions representing previously-analyzed versions of the
application.
|
void |
clearClassFeatures() |
void |
clearMissingClasses() |
BugCollection |
createEmptyCollectionWithMetadata()
Create a new empty BugCollection with the same metadata as this one.
|
BugInstance |
findBug(java.lang.String instanceHash,
java.lang.String bugType,
int lineNumber) |
long |
getAnalysisTimestamp()
Get the timestamp for when the analysis was performed.
|
AppVersion |
getAppVersionFromSequenceNumber(long target)
Gets the AppVersion corresponding to the given sequence number.
|
Cloud |
getCloud()
Get the instance of user annotation plugin
|
Cloud |
getCloudLazily() |
java.util.Collection<BugInstance> |
getCollection()
Return the Collection storing the BugInstance objects.
|
AppVersion |
getCurrentAppVersion()
Get the current AppVersion.
|
Project |
getProject() |
ProjectStats |
getProjectStats()
Get the project stats.
|
java.lang.String |
getReleaseName()
Get the current release name.
|
long |
getSequenceNumber()
Get the sequence number of the BugCollection.
|
long |
getTimestamp()
Get the timestamp for the analyzed code (when it was compiled)
|
boolean |
getWithMessages()
Return whether textual messages will be added to any generated XML
|
java.util.Map<java.lang.String,java.lang.String> |
getXmlCloudDetails() |
boolean |
hasDeadBugs() |
boolean |
isApplySuppressions() |
boolean |
isMultiversion() |
java.util.Iterator<BugInstance> |
iterator()
Return an Iterator over all the BugInstance objects in the BugCollection.
|
BugInstance |
lookupFromUniqueId(java.lang.String uniqueId)
Deprecated.
|
void |
readXML(java.io.InputStream in)
Read XML data from given input stream into this object, populating the
Project as a side effect.
|
void |
readXML(java.io.Reader reader)
Read XML data from given reader into this object, populating the Project
as a side effect.
|
void |
readXML(java.lang.String fileName)
Read XML data from given file into this object, populating given Project
as a side effect.
|
Cloud |
reinitializeCloud() |
void |
setAnalysisTimestamp(long timestamp)
Set the timestamp for when the analysis was performed.
|
void |
setAnalysisVersion(java.lang.String analysisVersion)
Set the version of FindBugs used to perform the analysis
|
void |
setApplySuppressions(boolean applySuppressions) |
void |
setClassFeatureSet(ClassFeatureSet classFeatureSet) |
void |
setMinimalXML(boolean minimalXML)
Set whether we should minimize XML
|
void |
setReleaseName(java.lang.String releaseName)
Set the current release name.
|
void |
setSequenceNumber(long sequence)
Set the sequence number of the BugCollection.
|
void |
setTimestamp(long timestamp)
Get the timestamp for the analyzed code (when it was compiled)
|
void |
setWithMessages(boolean withMessages)
Set whether textual messages should be added to any generated XML
|
void |
setXmlCloudDetails(java.util.Map<java.lang.String,java.lang.String> map) |
org.dom4j.Document |
toDocument()
Convert the BugCollection into a dom4j Document object.
|
void |
writeEpilogue(XMLOutput xmlOutput) |
void |
writePrologue(XMLOutput xmlOutput) |
void |
writeXML(java.io.OutputStream out)
Write the BugCollection to given output stream as XML using a UTF8 encoding.
|
void |
writeXML(java.lang.String fileName)
Write this BugCollection to a file as XML.
|
void |
writeXML(java.io.Writer out)
Write the BugCollection to given output stream as XML.
|
void |
writeXML(XMLOutput xmlOutput)
Write the BugCollection to an XMLOutput object.
|
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 ERROR_ELEMENT_NAME
static final java.lang.String ERROR_MESSAGE_ELEMENT_NAME
static final java.lang.String ERROR_EXCEPTION_ELEMENT_NAME
static final java.lang.String ERROR_STACK_TRACE_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
static final java.lang.String CLASS_HASHES_ELEMENT_NAME
static final java.lang.String HISTORY_ELEMENT_NAME
Project getProject()
void setReleaseName(java.lang.String releaseName)
releaseName
- the current release namejava.lang.String getReleaseName()
ProjectStats getProjectStats()
void setTimestamp(long timestamp)
timestamp
- the timestamp.long getTimestamp()
void setAnalysisTimestamp(long timestamp)
timestamp
- the analysis timestamp.void setAnalysisVersion(java.lang.String analysisVersion)
analysisVersion
- the analysis version.long getAnalysisTimestamp()
AppVersion getAppVersionFromSequenceNumber(long target)
void setSequenceNumber(long sequence)
sequence
- the sequence numbergetSequenceNumber()
long getSequenceNumber()
boolean isMultiversion()
boolean hasDeadBugs()
void clearAppVersions()
void addAppVersion(AppVersion appVersion)
appVersion
- the AppVersionAppVersion getCurrentAppVersion()
java.util.Iterator<AppVersion> appVersionIterator()
boolean add(BugInstance bugInstance)
bugInstance
- the BugInstanceboolean add(BugInstance bugInstance, boolean updateActiveTime)
bugInstance
- the BugInstanceupdateActiveTime
- true if the warning's active time should be updated to include
the collection's current time@Deprecated BugInstance lookupFromUniqueId(java.lang.String uniqueId)
uniqueId
- the BugInstance's unique id.void addError(java.lang.String message)
message
- the error messagevoid addError(AnalysisError error)
error
- the AnalysisError object to addvoid addMissingClass(java.lang.String message)
message
- the missing class messagevoid setClassFeatureSet(ClassFeatureSet classFeatureSet)
void writePrologue(XMLOutput xmlOutput) throws java.io.IOException
java.io.IOException
void writeEpilogue(XMLOutput xmlOutput) throws java.io.IOException
java.io.IOException
void clearClassFeatures()
void clearMissingClasses()
void readXML(java.lang.String fileName) throws java.io.IOException, org.dom4j.DocumentException
fileName
- name of the file to readjava.io.IOException
org.dom4j.DocumentException
void readXML(@WillClose java.io.InputStream in) throws java.io.IOException, org.dom4j.DocumentException
in
- the InputStreamjava.io.IOException
org.dom4j.DocumentException
void readXML(@WillClose java.io.Reader reader) throws java.io.IOException, org.dom4j.DocumentException
reader
- the Readerjava.io.IOException
org.dom4j.DocumentException
void writeXML(java.lang.String fileName) throws java.io.IOException
fileName
- the file to write tojava.io.IOException
void writeXML(@WillClose java.io.Writer out) throws java.io.IOException
out
- the OutputStream to write tojava.io.IOException
void writeXML(@WillClose java.io.OutputStream out) throws java.io.IOException
out
- the OutputStream to write tojava.io.IOException
void writeXML(@WillClose XMLOutput xmlOutput) throws java.io.IOException
To write the SummaryHTML element, set property findbugs.report.SummaryHTML to "true".
xmlOutput
- the XMLOutput objectjava.io.IOException
java.util.Iterator<BugInstance> iterator()
iterator
in interface java.lang.Iterable<BugInstance>
java.util.Collection<BugInstance> getCollection()
org.dom4j.Document toDocument()
BugCollection createEmptyCollectionWithMetadata()
void setWithMessages(boolean withMessages)
void setMinimalXML(boolean minimalXML)
boolean getWithMessages()
BugInstance findBug(java.lang.String instanceHash, java.lang.String bugType, int lineNumber)
boolean isApplySuppressions()
void setApplySuppressions(boolean applySuppressions)
@Nonnull Cloud getCloud()
@CheckForNull Cloud getCloudLazily()
@Nonnull Cloud reinitializeCloud()
void setXmlCloudDetails(java.util.Map<java.lang.String,java.lang.String> map)
java.util.Map<java.lang.String,java.lang.String> getXmlCloudDetails()
void bugsPopulated()
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.