soot
Class SourceLocator

java.lang.Object
  extended bysoot.SourceLocator

public class SourceLocator
extends Object

Provides utility methods to retrieve an input stream for a class name, given a classfile, or jimple or baf output files.


Nested Class Summary
static class SourceLocator.FoundFile
           
 
Constructor Summary
SourceLocator(soot.Singletons.Global g)
           
 
Method Summary
 void addToSourceToClassMap(String key, String val)
           
 Set classesInDynamicPackage(String str)
           
 List classPath()
           
protected  List explodeClassPath(String classPath)
          Explodes a class path into a list of individual class path entries.
 List getClassesUnder(String aPath)
           
 ClassSource getClassSource(String className)
          Given a class name, uses the soot-class-path to return a ClassSource for the given class.
 String getExtensionFor(int rep)
           
 String getFileNameFor(SootClass c, int rep)
           
 String getOutputDir()
           
 String getSourceForClass(String className)
          Returns the name of the class in which the (possibly inner) class className appears.
 HashMap getSourceToClassMap()
           
 void invalidateClassPath()
           
 SourceLocator.FoundFile lookupInClassPath(String fileName)
          Searches for a file with the given name in the exploded classPath.
 void setClassProviders(List classProviders)
           
 void setSourceToClassMap(HashMap map)
           
 List sourcePath()
           
static SourceLocator v()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceLocator

public SourceLocator(soot.Singletons.Global g)
Method Detail

v

public static SourceLocator v()

getClassSource

public ClassSource getClassSource(String className)
Given a class name, uses the soot-class-path to return a ClassSource for the given class.


setClassProviders

public void setClassProviders(List classProviders)

classPath

public List classPath()

invalidateClassPath

public void invalidateClassPath()

sourcePath

public List sourcePath()

getClassesUnder

public List getClassesUnder(String aPath)

getFileNameFor

public String getFileNameFor(SootClass c,
                             int rep)

classesInDynamicPackage

public Set classesInDynamicPackage(String str)

getExtensionFor

public String getExtensionFor(int rep)

getOutputDir

public String getOutputDir()

explodeClassPath

protected List explodeClassPath(String classPath)
Explodes a class path into a list of individual class path entries.


lookupInClassPath

public SourceLocator.FoundFile lookupInClassPath(String fileName)
Searches for a file with the given name in the exploded classPath.


getSourceToClassMap

public HashMap getSourceToClassMap()

setSourceToClassMap

public void setSourceToClassMap(HashMap map)

addToSourceToClassMap

public void addToSourceToClassMap(String key,
                                  String val)

getSourceForClass

public String getSourceForClass(String className)
Returns the name of the class in which the (possibly inner) class className appears.