Class JvmMethodTaintSource

java.lang.Object
proguard.analysis.cpa.jvm.domain.taint.JvmMethodTaintSource
All Implemented Interfaces:
TaintSource

public class JvmMethodTaintSource extends Object implements TaintSource
A JvmMethodTaintSource specifies a method which can taint any (subset) of the following: the instance, the return value, the argument objects, or static fields. The callMatcher decides whether the call (already filtered by its Signature) should trigger this source.
  • Field Details

  • Constructor Details

    • JvmMethodTaintSource

      public JvmMethodTaintSource(Signature signature, Predicate<Call> callMatcher, boolean taintThis, boolean taintReturn, Set<Integer> taintArgs, Set<String> taintGlobals)
      Create a taint source.
      Parameters:
      signature - the signature a source method
      callMatcher - whether the call matches this taint source
      taintThis - whether the source taints the calling instance
      taintReturn - whether the source taints its return
      taintArgs - a set of tainted arguments
      taintGlobals - a set of tainted global variables
    • JvmMethodTaintSource

      public JvmMethodTaintSource(Signature signature, boolean taintThis, boolean taintReturn, Set<Integer> taintArgs, Set<String> taintGlobals)
      Create a taint source.
      Parameters:
      signature - the signature a source method
      taintThis - whether the source taints the calling instance
      taintReturn - whether the source taints its return
      taintArgs - a set of tainted arguments
      taintGlobals - a set of tainted global variables
    • JvmMethodTaintSource

      public JvmMethodTaintSource(Signature signature, Optional<Predicate<Call>> callMatcher, boolean taintThis, boolean taintReturn, Set<Integer> taintArgs, Set<String> taintGlobals)
      Create a taint source.
      Parameters:
      signature - the signature a source method
      callMatcher - an optional predicate on whether the call matches this taint source
      taintThis - whether the source taints the calling instance
      taintReturn - whether the source taints its return
      taintArgs - a set of tainted arguments
      taintGlobals - a set of tainted global variables
  • Method Details

    • getSignature

      public Signature getSignature()
      Description copied from interface: TaintSource
      Returns the signature of the program location this taint source refers to.
      Specified by:
      getSignature in interface TaintSource
    • getTaintsThis

      public boolean getTaintsThis()
    • getTaintsReturn

      public boolean getTaintsReturn()
    • getTaintArgs

      public Set<Integer> getTaintArgs()
    • getTaintGlobals

      public Set<String> getTaintGlobals()
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object