public class ModulePathSourceLocator extends SourceLocator
SourceLocator.ClassSourceType| Modifier and Type | Field and Description |
|---|---|
static String |
DUMMY_CLASSPATH_JDK9_FS |
additionalClassLoaders, classPath, classProviders| Constructor and Description |
|---|
ModulePathSourceLocator(Singletons.Global g) |
| Modifier and Type | Method and Description |
|---|---|
void |
additionalClassLoader(ClassLoader c) |
Set<String> |
classesInDynamicPackage(String str) |
List<String> |
classPath() |
static List<String> |
explodeModulePath(String classPath) |
List<String> |
getClassesUnder(String aPath)
For backward compatibility returns classes in the form of module:classname
|
ClassSource |
getClassSource(String className)
Given a class name, uses the soot-class-path to return a ClassSource for the given class.
|
ClassSource |
getClassSource(String className,
com.google.common.base.Optional<String> moduleName)
Given a class name, uses the soot-module-path to return a ClassSource for the given class.
|
protected SourceLocator.ClassSourceType |
getClassSourceType(String path) |
Map<String,List<String>> |
getClassUnderModulePath(String aPath)
Scan the given module path entry.
|
static Path |
getRootModulesPathOfJDK() |
void |
invalidateClassPath() |
protected FoundFile |
lookupInArchive(String archivePath,
String fileName)
Looks up classes in an archive file
|
FoundFile |
lookupInClassPath(String fileName)
Searches for a file with the given name in the exploded modulePath.
|
FoundFile |
lookUpInModulePath(String fileName) |
FoundFile |
lookUpInVirtualFileSystem(String archivePath,
String fileName)
Looks up classes in Java 9's virtual filesystem jrt:/
|
protected void |
setupClassProviders() |
List<String> |
sourcePath() |
static ModulePathSourceLocator |
v() |
clearDexClassPathExtensions, dexClassIndex, ensureDirectoryExists, explodeClassPath, extendClassPath, getClassesUnder, getDexClassPathExtensions, getExtensionFor, getFileNameFor, getOutputDir, getOutputJarName, getSourceForClass, setClassProviders, setDexClassIndexpublic static final String DUMMY_CLASSPATH_JDK9_FS
public ModulePathSourceLocator(Singletons.Global g)
public static ModulePathSourceLocator v()
public ClassSource getClassSource(String className)
SourceLocatorgetClassSource in class SourceLocatorpublic ClassSource getClassSource(String className, com.google.common.base.Optional<String> moduleName)
public void additionalClassLoader(ClassLoader c)
additionalClassLoader in class SourceLocatorpublic List<String> classPath()
classPath in class SourceLocatorpublic void invalidateClassPath()
invalidateClassPath in class SourceLocatorpublic List<String> sourcePath()
sourcePath in class SourceLocatorpublic List<String> getClassesUnder(String aPath)
getClassesUnder in class SourceLocatoraPath - where to search for classespublic Map<String,List<String>> getClassUnderModulePath(String aPath)
public static Path getRootModulesPathOfJDK()
public Set<String> classesInDynamicPackage(String str)
classesInDynamicPackage in class SourceLocatorpublic FoundFile lookupInClassPath(String fileName)
lookupInClassPath in class SourceLocatorprotected SourceLocator.ClassSourceType getClassSourceType(String path)
getClassSourceType in class SourceLocatorprotected FoundFile lookupInArchive(String archivePath, String fileName)
lookupInArchive in class SourceLocatorarchivePath - path to the zip/jarfileName - the filename to searchpublic FoundFile lookUpInVirtualFileSystem(String archivePath, String fileName)
archivePath - path to the filesystemfileName - the file to searchprotected void setupClassProviders()
setupClassProviders in class SourceLocatorCopyright © 2020 Soot OSS. All rights reserved.