public class FieldSourceSinkDefinition extends AbstractSourceSinkDefinition implements IAccessPathBasedSourceSinkDefinition
| Modifier and Type | Field and Description |
|---|---|
protected Set<AccessPathTuple> |
accessPaths |
protected String |
fieldSignature |
category| Constructor and Description |
|---|
FieldSourceSinkDefinition(String fieldSignature)
Creates a new instance of the
FieldSourceSinkDefinition class |
FieldSourceSinkDefinition(String fieldSignature,
Set<AccessPathTuple> accessPaths)
Creates a new instance of the
FieldSourceSinkDefinition class |
| Modifier and Type | Method and Description |
|---|---|
protected FieldSourceSinkDefinition |
buildNewDefinition(Set<AccessPathTuple> accessPaths)
Factory method for creating a new field-based source/sink definition based on
the current one.
|
protected FieldSourceSinkDefinition |
buildNewDefinition(String fieldSignature,
Set<AccessPathTuple> accessPaths)
Factory method for creating a new field-based source/sink definition based on
the current one.
|
boolean |
equals(Object obj) |
IAccessPathBasedSourceSinkDefinition |
filter(Collection<AccessPathTuple> toFilter)
Filters the source/sink definition to only reference the given access paths
|
Set<AccessPathTuple> |
getAccessPaths()
Gets the access paths on the field that have been defined as sources or sinks
|
Set<AccessPathTuple> |
getAllAccessPaths()
Gets all access paths referenced in this source or sink definition,
regardless of their respective semantics
|
String |
getFieldSignature()
Gets the signature of the referenced Soot field
|
FieldSourceSinkDefinition |
getSinkOnlyDefinition()
Creates a definition which is a subset of this definition that only contains
the sinks
|
FieldSourceSinkDefinition |
getSourceOnlyDefinition()
Creates a definition which is a subset of this definition that only contains
the sources
|
int |
hashCode() |
boolean |
isEmpty()
Checks whether this source/sink definition is empty, i.e., has no concrete
access paths
|
void |
merge(ISourceSinkDefinition other)
Merges the source and sink definitions of the given definition object into
this definition object
|
getCategory, setCategoryclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCategory, setCategoryprotected final String fieldSignature
protected Set<AccessPathTuple> accessPaths
public FieldSourceSinkDefinition(String fieldSignature)
FieldSourceSinkDefinition classfieldSignature - The Soot signature of the target fieldpublic FieldSourceSinkDefinition(String fieldSignature, Set<AccessPathTuple> accessPaths)
FieldSourceSinkDefinition classfieldSignature - The Soot signature of the target fieldaccessPaths - The access paths on the field that have been defined as
sources or sinkspublic String getFieldSignature()
public Set<AccessPathTuple> getAccessPaths()
public FieldSourceSinkDefinition getSourceOnlyDefinition()
IAccessPathBasedSourceSinkDefinitiongetSourceOnlyDefinition in interface IAccessPathBasedSourceSinkDefinitiongetSourceOnlyDefinition in interface ISourceSinkDefinitionpublic FieldSourceSinkDefinition getSinkOnlyDefinition()
IAccessPathBasedSourceSinkDefinitiongetSinkOnlyDefinition in interface IAccessPathBasedSourceSinkDefinitiongetSinkOnlyDefinition in interface ISourceSinkDefinitionprotected FieldSourceSinkDefinition buildNewDefinition(Set<AccessPathTuple> accessPaths)
accessPaths - The of access paths for the new definitionprotected FieldSourceSinkDefinition buildNewDefinition(String fieldSignature, Set<AccessPathTuple> accessPaths)
fieldSignature - The field signatureaccessPaths - The of access paths for the new definitionpublic void merge(ISourceSinkDefinition other)
ISourceSinkDefinitionmerge in interface ISourceSinkDefinitionother - The definition object to mergepublic boolean isEmpty()
IAccessPathBasedSourceSinkDefinitionisEmpty in interface IAccessPathBasedSourceSinkDefinitionpublic Set<AccessPathTuple> getAllAccessPaths()
IAccessPathBasedSourceSinkDefinitiongetAllAccessPaths in interface IAccessPathBasedSourceSinkDefinitionpublic IAccessPathBasedSourceSinkDefinition filter(Collection<AccessPathTuple> toFilter)
IAccessPathBasedSourceSinkDefinitionfilter in interface IAccessPathBasedSourceSinkDefinitiontoFilter - The access path to which to limit the scope of this
source/sink definitionpublic int hashCode()
hashCode in class AbstractSourceSinkDefinitionpublic boolean equals(Object obj)
equals in class AbstractSourceSinkDefinitionCopyright © 2021 Fraunhofer SIT. All rights reserved.