Class ComponentReachableMethods

java.lang.Object
soot.jimple.infoflow.android.callbacks.ComponentReachableMethods

public class ComponentReachableMethods extends Object
Helper class that computes reachable methods only from a given set of starting methods, while ignoring all other methods. It will not take everything that is already reachable in the callgraph as the seed, but only work on what is explicitly given as the entry points. This class is heavily based on Soot's ReachableMethods class by Ondrej Lhotak.
Author:
Steven Arzt
  • Constructor Summary

    Constructors
    Constructor
    Description
    ComponentReachableMethods(InfoflowAndroidConfiguration config, soot.SootClass originalComponent, Collection<soot.MethodOrMethodContext> entryPoints)
    Creates a new instance of the ComponentReachableMethods class
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(soot.MethodOrMethodContext m)
    Returns true iff method is reachable.
    soot.util.queue.QueueReader<soot.MethodOrMethodContext>
    Returns a QueueReader object containing all methods found reachable so far, and which will be informed of any new methods that are later found to be reachable.
    soot.util.queue.QueueReader<soot.MethodOrMethodContext>
    Returns a QueueReader object which will contain ONLY NEW methods which will be found to be reachable, but not those that have already been found to be reachable.
    int
    Returns the number of methods that are reachable.
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ComponentReachableMethods

      public ComponentReachableMethods(InfoflowAndroidConfiguration config, soot.SootClass originalComponent, Collection<soot.MethodOrMethodContext> entryPoints)
      Creates a new instance of the ComponentReachableMethods class
      Parameters:
      config - The configuration of the data flow solver
      originalComponent - The original component or which we are looking for callback registrations. This information is used to more precisely model calls to abstract methods.
      entryPoints - The entry points from which to find the reachable methods
  • Method Details

    • update

      public void update()
    • listener

      public soot.util.queue.QueueReader<soot.MethodOrMethodContext> listener()
      Returns a QueueReader object containing all methods found reachable so far, and which will be informed of any new methods that are later found to be reachable.
    • newListener

      public soot.util.queue.QueueReader<soot.MethodOrMethodContext> newListener()
      Returns a QueueReader object which will contain ONLY NEW methods which will be found to be reachable, but not those that have already been found to be reachable.
    • contains

      public boolean contains(soot.MethodOrMethodContext m)
      Returns true iff method is reachable.
    • size

      public int size()
      Returns the number of methods that are reachable.