java.lang.Object
com.ibm.wala.dalvik.ipa.callgraph.androidModel.AndroidModel
com.ibm.wala.dalvik.ipa.callgraph.androidModel.MiniModel
All Implemented Interfaces:
com.ibm.wala.ipa.cha.IClassHierarchyDweller

public class MiniModel extends AndroidModel
Models all classes derived from the given AndroidComponent.

So for example it contains all EntryPoints from all Activities.

It is like a "regular" AndroidModel but the calls are restricted to EntryPoints whose target-class is of the type of the given AndroidComponent.

In the ClassHierarchy a MiniModel will be known as "AndroidModelClass.???Model" (where ??? is the AndroidComponent) and be called by "AndroidModelClass.startUnknown???" (which is generated by the UnknownTargetModel).

A MiniModel is used when a startComponent-call (startActivity, bindService, ...) is encountered, but the Context at the call site is insufficient to determine the actual target. In this case an UnknownTargetModel which uses an MiniModel and an ExternalModel is placed there.

Since:
2013-10-29
  • Constructor Details

    • MiniModel

      public MiniModel(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.ipa.callgraph.AnalysisOptions options, com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache, AndroidComponent forCompo)
  • Method Details

    • selectEntryPoint

      protected boolean selectEntryPoint(AndroidEntryPoint ep)
      Restrict the model to Activities.

      Overridden by models to restraint Entrypoints.

      For each entrypoint this method is queried if it should be part of the model.

      Overrides:
      selectEntryPoint in class AndroidModel
      Parameters:
      ep - The EntryPoint in question
      Returns:
      if the given EntryPoint shall be part of the model
    • getDescriptor

      public com.ibm.wala.types.Descriptor getDescriptor() throws com.ibm.wala.util.CancelException
      Overrides:
      getDescriptor in class AndroidModel
      Throws:
      com.ibm.wala.util.CancelException
    • getName

      public com.ibm.wala.core.util.strings.Atom getName()
      Overrides:
      getName in class AndroidModel
    • getMethod

      public com.ibm.wala.ipa.summaries.SummarizedMethod getMethod() throws com.ibm.wala.util.CancelException
      Description copied from class: AndroidModel
      Building the SummarizedMethod is delayed upon the first class to this method.
      Overrides:
      getMethod in class AndroidModel
      Returns:
      the method for this model as generated by build()
      Throws:
      com.ibm.wala.util.CancelException
    • toString

      public String toString()
      Overrides:
      toString in class AndroidModel