soot.javaToJimple
Class InitialResolver

java.lang.Object
  extended by soot.javaToJimple.InitialResolver
All Implemented Interfaces:
IInitialResolver

public class InitialResolver
extends Object
implements IInitialResolver


Nested Class Summary
 
Nested classes/interfaces inherited from interface soot.javaToJimple.IInitialResolver
IInitialResolver.Dependencies
 
Constructor Summary
InitialResolver(Singletons.Global g)
           
 
Method Summary
protected  void addNameToAST(String name)
          add name to AST to map - used mostly for inner and non public top-level classes
 void addToAnonConstructorMap(polyglot.ast.New anonNew, polyglot.types.ConstructorInstance ci)
           
 void addToPrivateFieldGetAccessMap(polyglot.ast.Field field, SootMethod meth)
           
 void addToPrivateFieldSetAccessMap(polyglot.ast.Field field, SootMethod meth)
           
 void addToPrivateMethodGetAccessMap(polyglot.ast.Call call, SootMethod meth)
           
protected  HashMap<String,String> classToSourceMap()
           
 HashMap<polyglot.util.IdentityKey,AnonLocalClassInfo> finalLocalInfo()
           
 void formAst(String fullPath, List<String> locations, String className)
          Invokes polyglot and gets the AST for the source given in fullPath
 BiMap getAnonClassMap()
           
 HashMap<polyglot.util.IdentityKey,String> getAnonTypeMap()
           
 polyglot.ast.Node getAst()
           
 polyglot.types.ConstructorInstance getConstructorForAnon(polyglot.ast.New anonNew)
           
 ArrayList getHasOuterRefInInit()
           
 HashMap<SootClass,InnerClassInfo> getInnerClassInfoMap()
           
 ArrayList<String> getInterfacesList()
           
 AbstractJBBFactory getJBBFactory()
           
 BiMap getLocalClassMap()
           
 HashMap<polyglot.util.IdentityKey,String> getLocalTypeMap()
           
protected  int getNextAnonNum()
           
 int getNextPrivateAccessCounter()
           
 HashMap<polyglot.util.IdentityKey,SootMethod> getPrivateFieldGetAccessMap()
           
 HashMap<polyglot.util.IdentityKey,SootMethod> getPrivateFieldSetAccessMap()
           
 HashMap<polyglot.util.IdentityKey,SootMethod> getPrivateMethodGetAccessMap()
           
 boolean hasASTForSootName(String name)
          returns true if there is an AST avail for given soot class
 boolean hasClassInnerTag(SootClass sc, String innerName)
           
 FastHierarchy hierarchy()
           
 void hierarchy(FastHierarchy fh)
           
 boolean isAnonInCCall(polyglot.types.ClassType anonType)
           
 void resolveAST()
           
 IInitialResolver.Dependencies resolveFromJavaFile(SootClass sc)
           
 void setAst(polyglot.ast.Node ast)
          if you have a special AST set it here then call resolveFormJavaFile on the soot class
 void setASTForSootName(String name)
          sets AST for given soot class if possible
 void setHasOuterRefInInit(ArrayList list)
           
 void setInnerClassInfoMap(HashMap<SootClass,InnerClassInfo> map)
           
 void setJBBFactory(AbstractJBBFactory jbbFactory)
           
 void setSpecialAnonMap(HashMap<SootClass,SootClass> map)
           
 HashMap<SootClass,SootClass> specialAnonMap()
           
static InitialResolver v()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitialResolver

public InitialResolver(Singletons.Global g)
Method Detail

addToAnonConstructorMap

public void addToAnonConstructorMap(polyglot.ast.New anonNew,
                                    polyglot.types.ConstructorInstance ci)

getConstructorForAnon

public polyglot.types.ConstructorInstance getConstructorForAnon(polyglot.ast.New anonNew)

setJBBFactory

public void setJBBFactory(AbstractJBBFactory jbbFactory)

getJBBFactory

public AbstractJBBFactory getJBBFactory()

hasASTForSootName

public boolean hasASTForSootName(String name)
returns true if there is an AST avail for given soot class


setASTForSootName

public void setASTForSootName(String name)
sets AST for given soot class if possible


v

public static InitialResolver v()

formAst

public void formAst(String fullPath,
                    List<String> locations,
                    String className)
Invokes polyglot and gets the AST for the source given in fullPath

Specified by:
formAst in interface IInitialResolver

setAst

public void setAst(polyglot.ast.Node ast)
if you have a special AST set it here then call resolveFormJavaFile on the soot class


getAst

public polyglot.ast.Node getAst()

addNameToAST

protected void addNameToAST(String name)
add name to AST to map - used mostly for inner and non public top-level classes


resolveAST

public void resolveAST()

resolveFromJavaFile

public IInitialResolver.Dependencies resolveFromJavaFile(SootClass sc)
Specified by:
resolveFromJavaFile in interface IInitialResolver

getNextAnonNum

protected int getNextAnonNum()

hasClassInnerTag

public boolean hasClassInnerTag(SootClass sc,
                                String innerName)

isAnonInCCall

public boolean isAnonInCCall(polyglot.types.ClassType anonType)

getAnonClassMap

public BiMap getAnonClassMap()

getLocalClassMap

public BiMap getLocalClassMap()

getAnonTypeMap

public HashMap<polyglot.util.IdentityKey,String> getAnonTypeMap()

getLocalTypeMap

public HashMap<polyglot.util.IdentityKey,String> getLocalTypeMap()

finalLocalInfo

public HashMap<polyglot.util.IdentityKey,AnonLocalClassInfo> finalLocalInfo()

getNextPrivateAccessCounter

public int getNextPrivateAccessCounter()

getHasOuterRefInInit

public ArrayList getHasOuterRefInInit()

setHasOuterRefInInit

public void setHasOuterRefInInit(ArrayList list)

specialAnonMap

public HashMap<SootClass,SootClass> specialAnonMap()

setSpecialAnonMap

public void setSpecialAnonMap(HashMap<SootClass,SootClass> map)

hierarchy

public void hierarchy(FastHierarchy fh)

hierarchy

public FastHierarchy hierarchy()

getInnerClassInfoMap

public HashMap<SootClass,InnerClassInfo> getInnerClassInfoMap()

setInnerClassInfoMap

public void setInnerClassInfoMap(HashMap<SootClass,InnerClassInfo> map)

classToSourceMap

protected HashMap<String,String> classToSourceMap()

addToPrivateFieldGetAccessMap

public void addToPrivateFieldGetAccessMap(polyglot.ast.Field field,
                                          SootMethod meth)

getPrivateFieldGetAccessMap

public HashMap<polyglot.util.IdentityKey,SootMethod> getPrivateFieldGetAccessMap()

addToPrivateFieldSetAccessMap

public void addToPrivateFieldSetAccessMap(polyglot.ast.Field field,
                                          SootMethod meth)

getPrivateFieldSetAccessMap

public HashMap<polyglot.util.IdentityKey,SootMethod> getPrivateFieldSetAccessMap()

addToPrivateMethodGetAccessMap

public void addToPrivateMethodGetAccessMap(polyglot.ast.Call call,
                                           SootMethod meth)

getPrivateMethodGetAccessMap

public HashMap<polyglot.util.IdentityKey,SootMethod> getPrivateMethodGetAccessMap()

getInterfacesList

public ArrayList<String> getInterfacesList()