Package org.jf.dexlib2.analysis
Class ClassPathResolver
java.lang.Object
org.jf.dexlib2.analysis.ClassPathResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classstatic classAn error that occurred while resolving the classpath -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClassPathResolver(List<String> bootClassPathDirs, List<String> bootClassPathEntries, List<String> extraClassPathEntries, MultiDexContainer.DexEntry<?> dexEntry) Constructs a new ClassPathResolver using a specified list of bootclasspath entriesClassPathResolver(List<String> bootClassPathDirs, List<String> extraClassPathEntries, MultiDexContainer.DexEntry<?> dexEntry) Constructs a new ClassPathResolver using a default list of bootclasspath entries -
Method Summary
Modifier and TypeMethodDescriptionbootClassPathForOat(OatFile oatFile) getDefaultBootClassPath(MultiDexContainer.DexEntry<?> dexEntry, int apiLevel) Returns the default boot class path for the given dex file and api level.private booleanloadLocalClassPathEntry(String entry) private voidreplaceElementsSuffix(List<String> bcp, String originalSuffix, String newSuffix) splitDevicePath(String path)
-
Field Details
-
classPathDirs
-
pathEntryLoader
-
-
Constructor Details
-
ClassPathResolver
public ClassPathResolver(@Nonnull List<String> bootClassPathDirs, @Nullable List<String> bootClassPathEntries, @Nonnull List<String> extraClassPathEntries, @Nonnull MultiDexContainer.DexEntry<?> dexEntry) throws IOException Constructs a new ClassPathResolver using a specified list of bootclasspath entries- Parameters:
bootClassPathDirs- A list of directories to search for boot classpath entries. Can be empty if all boot classpath entries are specified as local pathsbootClassPathEntries- A list of boot classpath entries to load. These can either be local paths, or device paths (e.g. "/system/framework/framework.jar"). The entry will be interpreted first as a local path. If not found as a local path, it will be interpreted as a partial or absolute device path, and will be searched for in bootClassPathDirsextraClassPathEntries- A list of additional classpath entries to load. Can be empty. All entries must be local paths. Device paths are not supported.dexEntry- The dex entry containing the dex file that the classpath will be used to analyze- Throws:
IOException- If any IOException occursClassPathResolver.ResolveException- If any classpath entries cannot be loaded for some reason If null, a default bootclasspath is used, depending on the the file type of dexFile and the api level. If empty, no boot classpath entries will be loaded
-
ClassPathResolver
public ClassPathResolver(@Nonnull List<String> bootClassPathDirs, @Nonnull List<String> extraClassPathEntries, @Nonnull MultiDexContainer.DexEntry<?> dexEntry) throws IOException Constructs a new ClassPathResolver using a default list of bootclasspath entries- Parameters:
bootClassPathDirs- A list of directories to search for boot classpath entriesextraClassPathEntries- A list of additional classpath entries to load. Can be empty. All entries must be local paths. Device paths are not supported.dexEntry- The dex entry containing the dex file that the classpath will be used to analyze- Throws:
IOException- If any IOException occursClassPathResolver.ResolveException- If any classpath entries cannot be loaded for some reason If null, a default bootclasspath is used, depending on the the file type of dexFile and the api level. If empty, no boot classpath entries will be loaded
-
-
Method Details
-
getResolvedClassProviders
-
loadLocalClassPathEntry
private boolean loadLocalClassPathEntry(@Nonnull String entry) throws PathEntryLoader.NoDexException, IOException -
loadLocalOrDeviceBootClassPathEntry
private void loadLocalOrDeviceBootClassPathEntry(@Nonnull String entry) throws IOException, PathEntryLoader.NoDexException, ClassPathResolver.NotFoundException -
splitDevicePath
-
getDefaultBootClassPath
@Nonnull private static List<String> getDefaultBootClassPath(@Nonnull MultiDexContainer.DexEntry<?> dexEntry, int apiLevel) Returns the default boot class path for the given dex file and api level. -
bootClassPathForOat
-
replaceElementsSuffix
-