Package soot

Class SootResolver

  • Direct Known Subclasses:
    SootModuleResolver

    public class SootResolver
    extends Object
    Loads symbols for SootClasses from either class files or jimple files.
    • Field Detail

      • classToTypesSignature

        protected MultiMap<SootClass,​Type> classToTypesSignature
        Maps each resolved class to a list of all references in it.
      • classToTypesHierarchy

        protected MultiMap<SootClass,​Type> classToTypesHierarchy
        Maps each resolved class to a list of all references in it.
    • Method Detail

      • initializeProgram

        protected void initializeProgram()
      • 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()