Class FieldSourceSinkDefinition
java.lang.Object
soot.jimple.infoflow.sourcesSinks.definitions.AbstractSourceSinkDefinition
soot.jimple.infoflow.sourcesSinks.definitions.FieldSourceSinkDefinition
- All Implemented Interfaces:
IAccessPathBasedSourceSinkDefinition,ISourceSinkDefinition
public class FieldSourceSinkDefinition
extends AbstractSourceSinkDefinition
implements IAccessPathBasedSourceSinkDefinition
Class for defining fields as sources or sinks
- Author:
- Steven Arzt
-
Field Summary
FieldsFields inherited from class soot.jimple.infoflow.sourcesSinks.definitions.AbstractSourceSinkDefinition
category, conditions -
Constructor Summary
ConstructorsConstructorDescriptionFieldSourceSinkDefinition(String fieldSignature) Creates a new instance of theFieldSourceSinkDefinitionclassFieldSourceSinkDefinition(String fieldSignature, Set<AccessPathTuple> accessPaths) Creates a new instance of theFieldSourceSinkDefinitionclass -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldSourceSinkDefinitionbuildNewDefinition(String fieldSignature, Set<AccessPathTuple> accessPaths) Factory method for creating a new field-based source/sink definition based on the current one.protected FieldSourceSinkDefinitionbuildNewDefinition(Set<AccessPathTuple> accessPaths) Factory method for creating a new field-based source/sink definition based on the current one.booleanfilter(Collection<AccessPathTuple> toFilter) Filters the source/sink definition to only reference the given access pathsGets the access paths on the field that have been defined as sources or sinksGets all access paths referenced in this source or sink definition, regardless of their respective semanticsGets the signature of the referenced Soot fieldCreates a definition which is a subset of this definition that only contains the sinksCreates a definition which is a subset of this definition that only contains the sourcesinthashCode()booleanisEmpty()Checks whether this source/sink definition is empty, i.e., has no concrete access pathstoString()Methods inherited from class soot.jimple.infoflow.sourcesSinks.definitions.AbstractSourceSinkDefinition
getCategory, getConditions, setCategory, setConditionsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface soot.jimple.infoflow.sourcesSinks.definitions.ISourceSinkDefinition
getCategory, getConditions, setCategory, setConditions
-
Field Details
-
fieldSignature
-
accessPaths
-
-
Constructor Details
-
FieldSourceSinkDefinition
Creates a new instance of theFieldSourceSinkDefinitionclass- Parameters:
fieldSignature- The Soot signature of the target field
-
FieldSourceSinkDefinition
Creates a new instance of theFieldSourceSinkDefinitionclass- Parameters:
fieldSignature- The Soot signature of the target fieldaccessPaths- The access paths on the field that have been defined as sources or sinks
-
-
Method Details
-
getFieldSignature
Gets the signature of the referenced Soot field- Returns:
- The signature of the referenced Soot field
-
getAccessPaths
Gets the access paths on the field that have been defined as sources or sinks- Returns:
- The access paths on the field that have been defined as sources or sinks
-
getSourceOnlyDefinition
Description copied from interface:IAccessPathBasedSourceSinkDefinitionCreates a definition which is a subset of this definition that only contains the sources- Specified by:
getSourceOnlyDefinitionin interfaceIAccessPathBasedSourceSinkDefinition- Specified by:
getSourceOnlyDefinitionin interfaceISourceSinkDefinition- Returns:
- The source-only subset of this definition
-
getSinkOnlyDefinition
Description copied from interface:IAccessPathBasedSourceSinkDefinitionCreates a definition which is a subset of this definition that only contains the sinks- Specified by:
getSinkOnlyDefinitionin interfaceIAccessPathBasedSourceSinkDefinition- Specified by:
getSinkOnlyDefinitionin interfaceISourceSinkDefinition- Returns:
- The sink-only subset of this definition
-
buildNewDefinition
Factory method for creating a new field-based source/sink definition based on the current one. This method is used when transforming the current definition. Derived classes can override this method to create instances of the correct class.- Parameters:
accessPaths- The of access paths for the new definition- Returns:
- The new source/sink definition
-
buildNewDefinition
protected FieldSourceSinkDefinition buildNewDefinition(String fieldSignature, Set<AccessPathTuple> accessPaths) Factory method for creating a new field-based source/sink definition based on the current one. This method is used when transforming the current definition. Derived classes can override this method to create instances of the correct class.- Parameters:
fieldSignature- The field signatureaccessPaths- The of access paths for the new definition- Returns:
- The new source/sink definition
-
isEmpty
public boolean isEmpty()Description copied from interface:IAccessPathBasedSourceSinkDefinitionChecks whether this source/sink definition is empty, i.e., has no concrete access paths- Specified by:
isEmptyin interfaceIAccessPathBasedSourceSinkDefinition- Specified by:
isEmptyin interfaceISourceSinkDefinition- Returns:
- True if this source/sink definition is empty, i.e., has no concrete access paths, otherwise false
-
getAllAccessPaths
Description copied from interface:IAccessPathBasedSourceSinkDefinitionGets all access paths referenced in this source or sink definition, regardless of their respective semantics- Specified by:
getAllAccessPathsin interfaceIAccessPathBasedSourceSinkDefinition- Returns:
- All access paths referenced in this source or sink definition. The return value can be null if this definition does not reference any access paths.
-
filter
Description copied from interface:IAccessPathBasedSourceSinkDefinitionFilters the source/sink definition to only reference the given access paths- Specified by:
filterin interfaceIAccessPathBasedSourceSinkDefinition- Parameters:
toFilter- The access path to which to limit the scope of this source/sink definition- Returns:
- A copy of this source/sink definition that only references the given access paths
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractSourceSinkDefinition
-
equals
- Overrides:
equalsin classAbstractSourceSinkDefinition
-
toString
-