Package soot
Class SootResolver
- java.lang.Object
-
- soot.SootResolver
-
- Direct Known Subclasses:
SootModuleResolver
public class SootResolver extends Object
Loads symbols for SootClasses from either class files or jimple files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSootResolver.SootClassNotFoundException
-
Field Summary
Fields Modifier and Type Field Description protected MultiMap<SootClass,Type>classToTypesHierarchyMaps each resolved class to a list of all references in it.protected MultiMap<SootClass,Type>classToTypesSignatureMaps each resolved class to a list of all references in it.
-
Constructor Summary
Constructors Constructor Description SootResolver(Singletons.Global g)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddToResolveWorklist(SootClass sc, int desiredLevel)protected voidaddToResolveWorklist(Type type, int level)protected voidbringToBodies(SootClass sc)Bodies - we can now start loading the bodies of methods for all referred to methods and fields in the bodies, requires signatures for the method receiver and field container, and hierarchy for all other classes referenced in method references.protected voidbringToBodiesUnchecked(SootClass sc)protected voidbringToHierarchy(SootClass sc)Hierarchy - we know the hierarchy of the class and that's it requires at least Hierarchy for all supertypes and enclosing types.protected voidbringToHierarchyUnchecked(SootClass sc)protected voidbringToSignatures(SootClass sc)Signatures - we know the signatures of all methods and fields requires at least Hierarchy for all referred to types in these signatures.protected voidbringToSignaturesUnchecked(SootClass sc)ProgramgetProgram()protected voidinitializeProgram()SootClassmakeClassRef(String className)Returns a (possibly not yet resolved) SootClass to be used in references to a class.protected voidprocessResolveWorklist()Resolve all classes on toResolveWorklist.voidreResolve(SootClass cl)voidreResolve(SootClass cl, int newResolvingLevel)voidreResolveHierarchy(SootClass sc, int level)SootClassresolveClass(String className, int desiredLevel)Resolves the given class.protected booleanresolveEverything()Returns true if we are resolving all class refs recursively.static SootResolverv()
-
-
-
Constructor Detail
-
SootResolver
public SootResolver(Singletons.Global g)
-
-
Method Detail
-
initializeProgram
protected void initializeProgram()
-
v
public static SootResolver v()
-
resolveEverything
protected boolean resolveEverything()
Returns true if we are resolving all class refs recursively.
-
makeClassRef
public SootClass makeClassRef(String className)
Returns a (possibly not yet resolved) SootClass to be used in references to a class. If/when the class is resolved, it will be resolved into this SootClass.
-
resolveClass
public SootClass resolveClass(String className, int desiredLevel)
Resolves the given class. Depending on the resolver settings, may decide to resolve other classes as well. If the class has already been resolved, just returns the class that was already resolved.
-
processResolveWorklist
protected void processResolveWorklist()
Resolve all classes on toResolveWorklist.
-
addToResolveWorklist
protected void addToResolveWorklist(Type type, int level)
-
addToResolveWorklist
protected void addToResolveWorklist(SootClass sc, int desiredLevel)
-
bringToHierarchy
protected void bringToHierarchy(SootClass sc)
Hierarchy - we know the hierarchy of the class and that's it requires at least Hierarchy for all supertypes and enclosing types.
-
bringToHierarchyUnchecked
protected void bringToHierarchyUnchecked(SootClass sc)
-
reResolveHierarchy
public void reResolveHierarchy(SootClass sc, int level)
-
bringToSignatures
protected void bringToSignatures(SootClass sc)
Signatures - we know the signatures of all methods and fields requires at least Hierarchy for all referred to types in these signatures.
-
bringToSignaturesUnchecked
protected void bringToSignaturesUnchecked(SootClass sc)
-
bringToBodies
protected void bringToBodies(SootClass sc)
Bodies - we can now start loading the bodies of methods for all referred to methods and fields in the bodies, requires signatures for the method receiver and field container, and hierarchy for all other classes referenced in method references. Current implementation does not distinguish between the receiver and other references. Therefore, it is conservative and brings all of them to signatures. But this could/should be improved.
-
bringToBodiesUnchecked
protected void bringToBodiesUnchecked(SootClass sc)
-
reResolve
public void reResolve(SootClass cl, int newResolvingLevel)
-
reResolve
public void reResolve(SootClass cl)
-
getProgram
public Program getProgram()
-
-