Class MiniModel
- java.lang.Object
-
- com.ibm.wala.dalvik.ipa.callgraph.androidModel.AndroidModel
-
- com.ibm.wala.dalvik.ipa.callgraph.androidModel.MiniModel
-
- All Implemented Interfaces:
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 Summary
Constructors Constructor Description MiniModel(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, AndroidComponent forCompo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Descriptor
getDescriptor()
SummarizedMethod
getMethod()
Building the SummarizedMethod is delayed upon the first class to this method.Atom
getName()
protected boolean
selectEntryPoint(AndroidEntryPoint ep)
Restrict the model to Activities.String
toString()
-
Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.AndroidModel
build, build, getClassHierarchy, getDeclaringClass, getMethodAs, getMethodEncap, getReturnType, isStatic
-
-
-
-
Constructor Detail
-
MiniModel
public MiniModel(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, AndroidComponent forCompo) throws CancelException
- Throws:
CancelException
-
-
Method Detail
-
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 classAndroidModel
- Parameters:
ep
- The EntryPoint in question- Returns:
- if the given EntryPoint shall be part of the model
-
getDescriptor
public Descriptor getDescriptor() throws CancelException
- Overrides:
getDescriptor
in classAndroidModel
- Throws:
CancelException
-
getName
public Atom getName()
- Overrides:
getName
in classAndroidModel
-
getMethod
public SummarizedMethod getMethod() throws CancelException
Description copied from class:AndroidModel
Building the SummarizedMethod is delayed upon the first class to this method.- Overrides:
getMethod
in classAndroidModel
- Returns:
- the method for this model as generated by build()
- Throws:
CancelException
-
toString
public String toString()
- Overrides:
toString
in classAndroidModel
-
-