public class ModuleScene extends Scene
Scene.AndroidVersionInfo
accessibilityOracle, activeCallGraph, activeFastHierarchy, activeHierarchy, activePointsToAnalysis, activeSideEffectAnalysis, allowsPhantomRefs, applicationClasses, basicclasses, classes, classNumberer, contextNumberer, cscg, doneResolving, dynamicClasses, entryPoints, excludedPackages, fieldNumberer, incrementalBuild, kindNumberer, libraryClasses, localNumberer, mainClass, methodNumberer, phantomClasses, reachableMethods, reservedNames, sootClassPath, subSigNumberer, typeNumberer, unitNumberer
Constructor and Description |
---|
ModuleScene(Singletons.Global g) |
Modifier and Type | Method and Description |
---|---|
protected void |
addClassSilent(SootClass c)
Adds the given class to the Scene.
|
void |
addRefType(RefType type) |
boolean |
containsClass(String className) |
boolean |
containsClass(String className,
com.google.common.base.Optional<String> moduleName) |
boolean |
containsType(String className) |
void |
extendSootClassPath(String newPathElement) |
void |
extendSootModulePath(String newPathElement) |
SootClass |
forceResolve(String className,
int level)
Forces Soot to resolve the class with the given name to the given level, even if resolving has actually already
finished.
|
SootClass |
forceResolve(String className,
int level,
com.google.common.base.Optional<String> moduleName) |
SootMethod |
getMainMethod() |
RefType |
getObjectType()
|
RefType |
getOrAddRefType(RefType tp) |
RefType |
getOrAddRefType(String className,
com.google.common.base.Optional<String> moduleName) |
RefType |
getRefType(String className)
Returns the RefType with the given className.
|
RefType |
getRefType(String className,
com.google.common.base.Optional<String> moduleName)
Returns the RefType with the given className.
|
RefType |
getRefTypeUnsafe(String className)
Returns the RefType with the given className.
|
RefType |
getRefTypeUnsafe(String className,
com.google.common.base.Optional<String> moduleName)
Returns the RefType with the given className.
|
SootClass |
getSootClass(String className)
Returns the SootClass with the given className.
|
SootClass |
getSootClass(String className,
com.google.common.base.Optional<String> moduleName) |
String |
getSootClassPath() |
SootClass |
getSootClassUnsafe(String className)
Returns the SootClass with the given className.
|
SootClass |
getSootClassUnsafe(String className,
com.google.common.base.Optional<String> moduleName) |
String |
getSootModulePath() |
Type |
getType(String arg,
com.google.common.base.Optional<String> moduleName)
Returns the RefType with the given class name or primitive type.
|
void |
loadBasicClasses()
Load just the set of basic classes soot needs, ignoring those specified on the command-line.
|
SootClass |
loadClass(String className,
int desiredLevel) |
SootClass |
loadClass(String className,
int desiredLevel,
com.google.common.base.Optional<String> moduleName) |
SootClass |
loadClassAndSupport(String className)
Loads the given class and all of the required support classes.
|
SootClass |
loadClassAndSupport(String className,
com.google.common.base.Optional<String> moduleName) |
void |
loadDynamicClasses() |
void |
loadNecessaryClasses()
Load the set of classes that soot needs, including those specified on the command-line.
|
SootClass |
makeSootClass(String className) |
SootClass |
makeSootClass(String name,
String moduleName) |
protected void |
prepareClasses()
Generate classes to process, adding or removing package marked by command line options.
|
void |
setMainClassFromOptions() |
void |
setSootClassPath(String p) |
void |
setSootModulePath(String p) |
SootClass |
tryLoadClass(String className,
int desiredLevel,
com.google.common.base.Optional<String> moduleName)
Attempts to load the given class and all of the required support classes.
|
static ModuleScene |
v() |
addBasicClass, addBasicClass, addClass, addReflectionTraceClasses, allowsPhantomRefs, containsField, containsMethod, createLocalCreation, createLocalCreation, createLocalGenerator, defaultClassPath, defaultJavaClassPath, doneResolving, dynamicClasses, getActiveHierarchy, getAndroidAPIVersion, getAndroidJarPath, getAndroidSDKVersionInfo, getApplicationClasses, getBasicClasses, getCallGraph, getClasses, getClasses, getClassNumberer, getClientAccessibilityOracle, getContextNumberer, getContextSensitiveCallGraph, getDefaultThrowAnalysis, getEntryPoints, getFastHierarchy, getField, getFieldNumberer, getLibraryClasses, getLocalNumberer, getMainClass, getMethod, getMethodNumberer, getOrAddRefType, getOrMakeFastHierarchy, getPhantomClasses, getPhantomRefs, getPkgList, getPointsToAnalysis, getReachableMethods, getReservedNames, getSideEffectAnalysis, getSootClassUnsafe, getState, getSubSigNumberer, getType, getTypeNumberer, getTypeUnsafe, getTypeUnsafe, getUnitNumberer, grabField, grabMethod, hasActiveHierarchy, hasCallGraph, hasClientAccessibilityOracle, hasCustomEntryPoints, hasFastHierarchy, hasMainClass, hasPointsToAnalysis, hasReachableMethods, hasSideEffectAnalysis, incrementalBuildFinished, initiateIncrementalBuild, internalMakeCallGraph, isApk, isBasicClass, isExcluded, isExcluded, isIncluded, isIncluded, isIncrementalBuild, isJavaGEQ9, kindNumberer, loadNecessaryClass, makeConstructorRef, makeFieldRef, makeMethodRef, makeSootClass, makeSootField, makeSootField, makeSootMethod, makeSootMethod, makeSootMethod, modifyHierarchy, quotedNameOf, releaseActiveHierarchy, releaseCallGraph, releaseClientAccessibilityOracle, releaseFastHierarchy, releasePointsToAnalysis, releaseReachableMethods, releaseSideEffectAnalysis, removeClass, setActiveHierarchy, setCallGraph, setClientAccessibilityOracle, setContextNumberer, setContextSensitiveCallGraph, setDefaultThrowAnalysis, setDoneResolving, setEntryPoints, setFastHierarchy, setMainClass, setPhantomRefs, setPkgList, setPointsToAnalysis, setReachableMethods, setSideEffectAnalysis, signatureToClass, signatureToSubsignature, tryLoadClass, unescapeName
public ModuleScene(Singletons.Global g)
public static ModuleScene v()
public SootMethod getMainMethod()
getMainMethod
in class Scene
public void extendSootClassPath(String newPathElement)
extendSootClassPath
in class Scene
public void extendSootModulePath(String newPathElement)
public String getSootClassPath()
getSootClassPath
in class Scene
public void setSootClassPath(String p)
setSootClassPath
in class Scene
public String getSootModulePath()
public void setSootModulePath(String p)
protected void addClassSilent(SootClass c)
Scene
addClassSilent
in class Scene
c
- The class to addpublic boolean containsClass(String className)
containsClass
in class Scene
public boolean containsClass(String className, com.google.common.base.Optional<String> moduleName)
public boolean containsType(String className)
containsType
in class Scene
public SootClass tryLoadClass(String className, int desiredLevel, com.google.common.base.Optional<String> moduleName)
public SootClass loadClassAndSupport(String className)
loadClassAndSupport
in class Scene
public SootClass loadClassAndSupport(String className, com.google.common.base.Optional<String> moduleName)
public SootClass loadClass(String className, int desiredLevel, com.google.common.base.Optional<String> moduleName)
public Type getType(String arg, com.google.common.base.Optional<String> moduleName)
RuntimeException
- if the Type for this name cannot be found. Use getRefTypeUnsafe(String, Optional)
to check if type is
an registered RefType.public RefType getRefType(String className, com.google.common.base.Optional<String> moduleName)
IllegalStateException
- if the RefType for this class cannot be found. Use containsType(String)
to check if type is
registeredpublic RefType getRefType(String className)
Scene
getRefType
in class Scene
public RefType getObjectType()
Scene
getObjectType
in class Scene
public RefType getRefTypeUnsafe(String className, com.google.common.base.Optional<String> moduleName)
public RefType getRefTypeUnsafe(String className)
Scene
getRefTypeUnsafe
in class Scene
public void addRefType(RefType type)
public SootClass getSootClassUnsafe(String className)
Scene
getSootClassUnsafe
in class Scene
className
- The name of the class to getpublic SootClass getSootClassUnsafe(String className, com.google.common.base.Optional<String> moduleName)
public SootClass getSootClass(String className)
Scene
getSootClass
in class Scene
className
- The name of the class to get; throws RuntimeException if this class does not exist.public SootClass getSootClass(String className, com.google.common.base.Optional<String> moduleName)
public void loadBasicClasses()
Scene
Scene.loadNecessaryClasses()
, though it will only waste time.loadBasicClasses
in class Scene
public void loadNecessaryClasses()
loadNecessaryClasses
in class Scene
public void loadDynamicClasses()
loadDynamicClasses
in class Scene
protected void prepareClasses()
prepareClasses
in class Scene
public void setMainClassFromOptions()
setMainClassFromOptions
in class Scene
public SootClass forceResolve(String className, int level)
Scene
forceResolve
in class Scene
public SootClass forceResolve(String className, int level, com.google.common.base.Optional<String> moduleName)
public SootClass makeSootClass(String className)
makeSootClass
in class Scene
Copyright © 2021 Soot OSS. All rights reserved.