Class AccessPathTuple

java.lang.Object
soot.jimple.infoflow.sourcesSinks.definitions.AccessPathTuple
Direct Known Subclasses:
ImmutableAccessPathTuple

public class AccessPathTuple extends Object
Helper to save an AccessPath with the information about sink and sources.
Author:
Joern Tillmanns, Steven Arzt
  • Method Details

    • create

      public static AccessPathTuple create(boolean isSource, boolean isSink)
      Simplified factory method for creating an access path that just denotes the base object
      Parameters:
      isSource - True if the referenced access path shall be considered a data flow source
      isSink - True if the referenced access path shall be considered a data flow sink
      Returns:
      The newly created access path object
    • fromPathElements

      public static AccessPathTuple fromPathElements(List<String> fields, List<String> fieldTypes, boolean isSource, boolean isSink)
    • fromPathElements

      public static AccessPathTuple fromPathElements(List<String> fields, List<String> fieldTypes, SourceSinkType sourceSinkType)
    • fromPathElements

      public static AccessPathTuple fromPathElements(String field, String fieldType, SourceSinkType sourceSinkType)
    • fromPathElements

      public static AccessPathTuple fromPathElements(String baseType, String field, String fieldType, SourceSinkType sourceSinkType)
    • fromPathElements

      public static AccessPathTuple fromPathElements(String baseType, List<String> fields, List<String> fieldTypes, SourceSinkType sourceSinkType)
    • fromPathElements

      public static AccessPathTuple fromPathElements(String[] fields, String[] fieldTypes, boolean isSource, boolean isSink)
    • fromPathElements

      public static AccessPathTuple fromPathElements(String baseType, String[] fields, String[] fieldTypes, boolean isSource, boolean isSink)
    • getBaseType

      public String getBaseType()
    • getFields

      public String[] getFields()
    • getFieldTypes

      public String[] getFieldTypes()
    • getSourceSinkType

      public SourceSinkType getSourceSinkType()
    • getBlankSourceTuple

      public static AccessPathTuple getBlankSourceTuple()
      Gets the shared tuple that denoted just the base object as a source
      Returns:
      The tuple that denotes just the base object as a source
    • getBlankSinkTuple

      public static AccessPathTuple getBlankSinkTuple()
      Gets the shared tuple that denoted just the base object as a sink
      Returns:
      The tuple that denotes just the base object as a sink
    • getDescription

      public String getDescription()
      Gets the description of this access path
      Returns:
      The description of this access path
    • setDescription

      public void setDescription(String description)
      Sets the description of this access path
      Parameters:
      description - The description of this access path
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • simplify

      public AccessPathTuple simplify()
      Checks whether this tuple is equivalent to one of the simple predefined ones. If so, it returns the shared predefined object. Otherwise, it returns this object.
      Returns:
      A shared object that is equal to this one if possible, otherwise this object
    • toAccessPath

      public AccessPath toAccessPath(soot.Value baseVal, InfoflowManager manager, boolean canHaveImmutableAliases)
      Creates an access path from an access path definition object
      Parameters:
      baseVal - The base for the new access path
      manager - The manager to be used for creating new access paths
      canHaveImmutableAliases - Specifies if the newly tainted value can have aliases that are not overwritten by the current operation, i.e., whether there must be an alias analysis from the source statement backwards through the code
      Returns:
      The newly created access path
    • toString

      public String toString()
      Overrides:
      toString in class Object