org.dellroad.jc.cgen
Class SourceLocator

java.lang.Object
  extended bysoot.util.SourceLocator
      extended byorg.dellroad.jc.cgen.SourceLocator

public class SourceLocator
extends SourceLocator

Implementation of Soot's SourceLocator interface used by the SootCodeGenerator class. In order for Soot to pick up and analyze the correct class files, we must provide our own implementation which retrieves them from the JC virtual machine. This ensures that no matter how any particular ClassLoader retrieves a class file, that exact same class file will be made available to Soot for analysis.


Constructor Summary
SourceLocator(Singletons.Global g)
           
 
Method Summary
 InputStream getInputStreamOf(String className)
          Retrieve the classfile contents for the named class, as loaded by the ClassLoader associated with this object.
 void setFinder(ClassfileFinder finder)
           
 
Methods inherited from class soot.util.SourceLocator
addToSourceToClassMap, classesInDynamicPackage, getClassesUnder, getExtensionFor, getFileNameFor, getFullPathFound, getInputStreamOf, getLocationsFound, getOutputDir, getSourceToClassMap, setSourceToClassMap, v
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceLocator

public SourceLocator(Singletons.Global g)
Method Detail

setFinder

public void setFinder(ClassfileFinder finder)

getInputStreamOf

public InputStream getInputStreamOf(String className)
                             throws ClassNotFoundException
Retrieve the classfile contents for the named class, as loaded by the ClassLoader associated with this object.

Throws:
ClassNotFoundException