public class InfoflowResultsSerializer extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected InfoflowConfiguration |
config |
static int |
FILE_FORMAT_VERSION |
protected IInfoflowCFG |
icfg |
protected boolean |
serializeTaintPath |
protected long |
startTime |
| 构造器和说明 |
|---|
InfoflowResultsSerializer(IInfoflowCFG cfg,
InfoflowConfiguration config)
Creates a new instance of the InfoflowResultsSerializer class
|
InfoflowResultsSerializer(InfoflowConfiguration config)
Creates a new instance of the InfoflowResultsSerializer class
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
serialize(InfoflowResults results,
String fileName)
Serializes the given FlowDroid result object into the given file
|
void |
setSerializeTaintPath(boolean serialize)
Sets whether the taint propagation path shall be serialized along with the
respective data flow result
|
protected void |
writeAccessPath(AccessPath accessPath,
XMLStreamWriter writer)
Writes the given access path into the given XML stream writer
|
protected void |
writeAdditionalSinkInfo(ResultSinkInfo sink,
XMLStreamWriter writer)
Derived classes can override this method to write out additional information
about a data flow sink
|
protected void |
writeAdditionalSourceInfo(ResultSourceInfo source,
XMLStreamWriter writer)
Derived classes can override this method to write out additional information
about a data flow source
|
protected void |
writeDataFlows(InfoflowResults results,
XMLStreamWriter writer)
Writes the given data flow results into the given XML stream writer
|
public static final int FILE_FORMAT_VERSION
protected boolean serializeTaintPath
protected IInfoflowCFG icfg
protected InfoflowConfiguration config
protected long startTime
public InfoflowResultsSerializer(InfoflowConfiguration config)
config - The configuration of the data flowpublic InfoflowResultsSerializer(IInfoflowCFG cfg, InfoflowConfiguration config)
cfg - The control flow graph to be used for obtaining additional
information such as the methods containing source or sink
statementsconfig - The configuration of the data flowpublic void serialize(InfoflowResults results, String fileName) throws XMLStreamException, IOException
results - The result object to serializefileName - The target file nameXMLStreamException - Thrown if the XML data cannot be writtenIOException - Thrown if the target file could not be writtenprotected void writeDataFlows(InfoflowResults results, XMLStreamWriter writer) throws XMLStreamException
results - The results to write outwriter - The stream writer into which to write the resultsXMLStreamException - Thrown if the XML data cannot be writtenprotected void writeAdditionalSourceInfo(ResultSourceInfo source, XMLStreamWriter writer) throws XMLStreamException
source - The source information to write outwriter - The stream writer into which to write the resultsXMLStreamException - Thrown if the XML data cannot be writtenprotected void writeAdditionalSinkInfo(ResultSinkInfo sink, XMLStreamWriter writer) throws XMLStreamException
sink - The sink information to write outwriter - The stream writer into which to write the resultsXMLStreamException - Thrown if the XML data cannot be writtenprotected void writeAccessPath(AccessPath accessPath, XMLStreamWriter writer) throws XMLStreamException
accessPath - The access path to write outwriter - The stream writer into which to write the dataXMLStreamException - Thrown if the XML data cannot be writtenpublic void setSerializeTaintPath(boolean serialize)
serialize - True if taint propagation paths shall be serialized,
otherwise falseCopyright © 2022 Fraunhofer SIT. All rights reserved.