public interface BugCollection extends Iterable<BugInstance>
| Modifier and Type | Field and Description |
|---|---|
static String |
ANALYSIS_ERROR_ELEMENT_NAME |
static String |
APP_CLASS_ELEMENT_NAME |
static String |
CLASS_HASHES_ELEMENT_NAME |
static String |
ERROR_ELEMENT_NAME |
static String |
ERROR_EXCEPTION_ELEMENT_NAME |
static String |
ERROR_MESSAGE_ELEMENT_NAME |
static String |
ERROR_STACK_TRACE_ELEMENT_NAME |
static String |
ERRORS_ELEMENT_NAME |
static String |
HISTORY_ELEMENT_NAME |
static String |
MISSING_CLASS_ELEMENT_NAME |
static String |
PROJECT_ELEMENT_NAME |
static String |
ROOT_ELEMENT_NAME |
static String |
SRCMAP_ELEMENT_NAME |
static 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(String message)
Add an analysis error.
|
void |
addMissingClass(String message)
Add a missing class message.
|
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(String instanceHash,
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() |
Collection<BugInstance> |
getCollection()
Return the Collection storing the BugInstance objects.
|
AppVersion |
getCurrentAppVersion()
Get the current AppVersion.
|
Project |
getProject() |
ProjectStats |
getProjectStats()
Get the project stats.
|
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
|
Map<String,String> |
getXmlCloudDetails() |
boolean |
hasDeadBugs() |
boolean |
isApplySuppressions() |
boolean |
isMultiversion() |
Iterator<BugInstance> |
iterator()
Return an Iterator over all the BugInstance objects in the BugCollection.
|
BugInstance |
lookupFromUniqueId(String uniqueId)
Deprecated.
|
void |
readXML(InputStream in)
Read XML data from given input stream into this object, populating the
Project as a side effect.
|
void |
readXML(Reader reader)
Read XML data from given reader into this object, populating the Project
as a side effect.
|
void |
readXML(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(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(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(Map<String,String> map) |
org.dom4j.Document |
toDocument()
Convert the BugCollection into a dom4j Document object.
|
void |
writeEpilogue(XMLOutput xmlOutput) |
void |
writePrologue(XMLOutput xmlOutput) |
void |
writeXML(OutputStream out)
Write the BugCollection to given output stream as XML using a UTF8 encoding.
|
void |
writeXML(String fileName)
Write this BugCollection to a file as XML.
|
void |
writeXML(Writer out)
Write the BugCollection to given output stream as XML.
|
void |
writeXML(XMLOutput xmlOutput)
Write the BugCollection to an XMLOutput object.
|
static final String ROOT_ELEMENT_NAME
static final String SRCMAP_ELEMENT_NAME
static final String PROJECT_ELEMENT_NAME
static final String ERRORS_ELEMENT_NAME
static final String ANALYSIS_ERROR_ELEMENT_NAME
static final String ERROR_ELEMENT_NAME
static final String ERROR_MESSAGE_ELEMENT_NAME
static final String ERROR_EXCEPTION_ELEMENT_NAME
static final String ERROR_STACK_TRACE_ELEMENT_NAME
static final String MISSING_CLASS_ELEMENT_NAME
static final String SUMMARY_HTML_ELEMENT_NAME
static final String APP_CLASS_ELEMENT_NAME
static final String CLASS_HASHES_ELEMENT_NAME
static final String HISTORY_ELEMENT_NAME
Project getProject()
void setReleaseName(String releaseName)
releaseName - the current release nameString getReleaseName()
ProjectStats getProjectStats()
void setTimestamp(long timestamp)
timestamp - the timestamp.long getTimestamp()
void setAnalysisTimestamp(long timestamp)
timestamp - the analysis timestamp.void setAnalysisVersion(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()
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(String uniqueId)
uniqueId - the BugInstance's unique id.void addError(String message)
message - the error messagevoid addError(AnalysisError error)
error - the AnalysisError object to addvoid addMissingClass(String message)
message - the missing class messagevoid setClassFeatureSet(ClassFeatureSet classFeatureSet)
void writePrologue(XMLOutput xmlOutput) throws IOException
IOExceptionvoid writeEpilogue(XMLOutput xmlOutput) throws IOException
IOExceptionvoid clearClassFeatures()
void clearMissingClasses()
void readXML(String fileName) throws IOException, org.dom4j.DocumentException
fileName - name of the file to readIOExceptionorg.dom4j.DocumentExceptionvoid readXML(@WillClose InputStream in) throws IOException, org.dom4j.DocumentException
in - the InputStreamIOExceptionorg.dom4j.DocumentExceptionvoid readXML(@WillClose Reader reader) throws IOException, org.dom4j.DocumentException
reader - the ReaderIOExceptionorg.dom4j.DocumentExceptionvoid writeXML(String fileName) throws IOException
fileName - the file to write toIOExceptionvoid writeXML(@WillClose Writer out) throws IOException
out - the OutputStream to write toIOExceptionvoid writeXML(@WillClose OutputStream out) throws IOException
out - the OutputStream to write toIOExceptionvoid writeXML(@WillClose XMLOutput xmlOutput) throws IOException
To write the SummaryHTML element, set property findbugs.report.SummaryHTML to "true".
xmlOutput - the XMLOutput objectIOExceptionIterator<BugInstance> iterator()
iterator in interface Iterable<BugInstance>Collection<BugInstance> getCollection()
org.dom4j.Document toDocument()
BugCollection createEmptyCollectionWithMetadata()
void setWithMessages(boolean withMessages)
void setMinimalXML(boolean minimalXML)
boolean getWithMessages()
BugInstance findBug(String instanceHash, String bugType, int lineNumber)
boolean isApplySuppressions()
void setApplySuppressions(boolean applySuppressions)
@Nonnull Cloud getCloud()
@CheckForNull Cloud getCloudLazily()
void bugsPopulated()
Copyright © 2003–2015. All rights reserved.