public class AndroidModel extends Object implements com.ibm.wala.ipa.cha.IClassHierarchyDweller
Between the calls to the AndroidEntryPoints special behavior is inserted. You can change that behavior by implementing an AbstractAndroidModel or set one of the existing ones in the AnalysisOptions. Additionally care of how types are instantiated is taken. You can change this behavior by setting the IInstanciationBehavior in the AnalysisOptions. Smaller Models exist: * MiniModel calls all components of a specific type (for example all Activities) * MicroModel calls a single specific component * ExternalModel doesn't call anything but fiddles with the data on its own All these Models are added to a synthetic AndroidModelClass.
| Modifier and Type | Field and Description |
|---|---|
protected com.ibm.wala.ipa.summaries.VolatileMethodSummary |
body |
protected boolean |
built |
protected com.ibm.wala.ipa.callgraph.IAnalysisCacheView |
cache |
protected com.ibm.wala.ipa.cha.IClassHierarchy |
cha |
protected static boolean |
doBoot |
protected com.ibm.wala.classLoader.IClass |
klass |
protected com.ibm.wala.ipa.summaries.SummarizedMethod |
model |
com.ibm.wala.types.MethodReference |
mRef |
protected com.ibm.wala.ipa.callgraph.AnalysisOptions |
options |
protected com.ibm.wala.ipa.callgraph.AnalysisScope |
scope |
| Constructor and Description |
|---|
AndroidModel(com.ibm.wala.ipa.cha.IClassHierarchy cha,
com.ibm.wala.ipa.callgraph.AnalysisOptions options,
com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
build(com.ibm.wala.util.strings.Atom name)
Generates the model on a sub-set of Entrypoints.
|
protected void |
build(com.ibm.wala.util.strings.Atom name,
Collection<? extends AndroidEntryPoint> entrypoints)
Generate the SummarizedMethod for the model (in this.model).
|
com.ibm.wala.ipa.cha.IClassHierarchy |
getClassHierarchy() |
com.ibm.wala.classLoader.IClass |
getDeclaringClass()
The class the Method representing this Model resides in.
|
com.ibm.wala.types.Descriptor |
getDescriptor() |
com.ibm.wala.ipa.summaries.SummarizedMethod |
getMethod()
Building the SummarizedMethod is delayed upon the first class to this method.
|
com.ibm.wala.ipa.summaries.SummarizedMethod |
getMethodAs(com.ibm.wala.types.MethodReference asMethod,
com.ibm.wala.types.TypeReference caller,
IntentStarters.StartInfo info,
com.ibm.wala.ipa.callgraph.CGNode callerNd)
Get method of the Model in an other Signature.
|
com.ibm.wala.classLoader.IMethod |
getMethodEncap()
Creates an "encapsulated" version of the model.
|
com.ibm.wala.util.strings.Atom |
getName() |
com.ibm.wala.types.TypeName |
getReturnType() |
boolean |
isStatic() |
protected boolean |
selectEntryPoint(AndroidEntryPoint ep)
Overridden by models to restraint Entrypoints.
|
String |
toString() |
public com.ibm.wala.types.MethodReference mRef
protected com.ibm.wala.ipa.cha.IClassHierarchy cha
protected com.ibm.wala.ipa.callgraph.AnalysisOptions options
protected com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache
protected final com.ibm.wala.ipa.callgraph.AnalysisScope scope
protected com.ibm.wala.ipa.summaries.VolatileMethodSummary body
protected static boolean doBoot
protected com.ibm.wala.classLoader.IClass klass
protected boolean built
protected com.ibm.wala.ipa.summaries.SummarizedMethod model
public AndroidModel(com.ibm.wala.ipa.cha.IClassHierarchy cha,
com.ibm.wala.ipa.callgraph.AnalysisOptions options,
com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache)
protected void build(com.ibm.wala.util.strings.Atom name)
throws com.ibm.wala.util.CancelException
selectEntryPoint(AndroidEntryPoint) for each EntryPoint known to the AndroidEntryPointManager,
if the EntryPoint should be included in the model. Then calls build(Atom, Collection)
on these.name - The name the generated method will be known ascom.ibm.wala.util.CancelExceptionpublic com.ibm.wala.util.strings.Atom getName()
public boolean isStatic()
public com.ibm.wala.types.TypeName getReturnType()
public com.ibm.wala.types.Descriptor getDescriptor()
throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionprotected void build(com.ibm.wala.util.strings.Atom name,
Collection<? extends AndroidEntryPoint> entrypoints)
throws com.ibm.wala.util.CancelException
getMethod() to retrieve the method generated here or getMethodAs to get a version
which is wrapped to another signature.name - The name the generated method will be known asentrypoints - The functions to call additionally to boot-code and XXXcom.ibm.wala.util.CancelExceptionpublic com.ibm.wala.ipa.summaries.SummarizedMethod getMethod()
throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionpublic com.ibm.wala.classLoader.IClass getDeclaringClass()
protected boolean selectEntryPoint(AndroidEntryPoint ep)
ep - The EntryPoint in questionpublic com.ibm.wala.ipa.summaries.SummarizedMethod getMethodAs(com.ibm.wala.types.MethodReference asMethod,
com.ibm.wala.types.TypeReference caller,
IntentStarters.StartInfo info,
com.ibm.wala.ipa.callgraph.CGNode callerNd)
throws com.ibm.wala.util.CancelException
asMethod - The signature to generatecaller - The class of the caller; only needed depending on the flagsinfo - The IntentSterter usedcallerNd - CGNoodle of the caller - may be nullcom.ibm.wala.util.CancelExceptionIntentContextInterpreter,
IntentStarterspublic com.ibm.wala.classLoader.IMethod getMethodEncap()
throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionpublic com.ibm.wala.ipa.cha.IClassHierarchy getClassHierarchy()
getClassHierarchy in interface com.ibm.wala.ipa.cha.IClassHierarchyDwellerCopyright © 2019. All rights reserved.