/** * Return the information regarding the primordial loader. */ public ClassLoaderReference getPrimordialLoader() { return getLoader(PRIMORDIAL); }
/** * Return the information regarding the application loader. */ public ClassLoaderReference getApplicationLoader() { return getLoader(APPLICATION); }
/** * Return the information regarding the application loader. */ public ClassLoaderReference getSyntheticLoader() { return getLoader(SYNTHETIC); }
/** * Return the information regarding the extension loader. */ public ClassLoaderReference getExtensionLoader() { return getLoader(EXTENSION); }
/** * Return the information regarding the extension loader. */ public ClassLoaderReference getExtensionLoader() { return getLoader(EXTENSION); }
/** * Return the information regarding the application loader. */ public ClassLoaderReference getApplicationLoader() { return getLoader(APPLICATION); }
/** * Return the information regarding the application loader. */ public ClassLoaderReference getSyntheticLoader() { return getLoader(SYNTHETIC); }
/** * Return the information regarding the primordial loader. */ public ClassLoaderReference getPrimordialLoader() { return getLoader(PRIMORDIAL); }
/** * Method classLoaderName2Ref. * * @return ClassLoaderReference */ private ClassLoaderReference classLoaderName2Ref(String clName) { return scope.getLoader(Atom.findOrCreateUnicodeAtom(clName)); }
/** * Method classLoaderName2Ref. * * @return ClassLoaderReference */ private ClassLoaderReference classLoaderName2Ref(String clName) { return scope.getLoader(Atom.findOrCreateUnicodeAtom(clName)); }
protected ClassLoaderReference classLoaderName2Ref(String clName) { return getLoader(Atom.findOrCreateUnicodeAtom(clName)); }
protected ClassLoaderReference classLoaderName2Ref(String clName) { return getLoader(Atom.findOrCreateUnicodeAtom(clName)); }
/** * @param classPath class path to analyze, delimited by {@link File#pathSeparator} * @param exclusionsFile file holding class hierarchy exclusions. may be null * @throws IllegalStateException if there are problems reading wala properties */ public static AnalysisScope makeJavaBinaryAnalysisScope(String classPath, File exclusionsFile) throws IOException { if (classPath == null) { throw new IllegalArgumentException("classPath null"); } AnalysisScope scope = makePrimordialScope(exclusionsFile); ClassLoaderReference loader = scope.getLoader(AnalysisScope.APPLICATION); addClassPathToScope(classPath, scope, loader); return scope; }
/** END Custom change: Fixes in AndroidAnalysisScope */ public static AnalysisScope makeAndroidBinaryAnalysisScope( URI classPath, String exclusionsFile) throws IOException { if (classPath == null) { throw new IllegalArgumentException("classPath null"); } AnalysisScope scope = AnalysisScopeReader.readJavaScope(BASIC_FILE, new File(exclusionsFile), WALA_CLASSLOADER); ClassLoaderReference loader = scope.getLoader(AnalysisScope.APPLICATION); final String path = classPath.getPath(); if (path.endsWith(".jar") || path.endsWith(".apk") || path.endsWith(".dex")) { scope.addToScope(loader, DexFileModule.make(new File(classPath))); } else { throw new IOException( "could not determine type of classpath from file extension: " + path); } return scope; } }
/** * @param classPath class path to analyze, delimited by {@link File#pathSeparator} * @param exclusionsFile file holding class hierarchy exclusions. may be null * @throws IllegalStateException if there are problems reading wala properties */ public static AnalysisScope makeJavaBinaryAnalysisScope(String classPath, File exclusionsFile) throws IOException { if (classPath == null) { throw new IllegalArgumentException("classPath null"); } AnalysisScope scope = makePrimordialScope(exclusionsFile); ClassLoaderReference loader = scope.getLoader(AnalysisScope.APPLICATION); addClassPathToScope(classPath, scope, loader); return scope; }
public boolean isApplicationLoader(IClassLoader loader) { return loader.getReference().equals(getLoader(APPLICATION)); }
/** * @param classPath class path to analyze, delimited by File.pathSeparator * @param exclusionsFile file holding class hierarchy exclusions. may be null * @throws IllegalStateException if there are problems reading wala properties */ public static AnalysisScope makeJavaBinaryAnalysisScopeFromPlugin(String classPath, File exclusionsFile, Plugin plugIn) throws IOException { if (classPath == null) { throw new IllegalArgumentException("classPath null"); } AnalysisScope scope = makePrimordialScopeFromPlugin(exclusionsFile, plugIn); ClassLoaderReference loader = scope.getLoader(AnalysisScope.APPLICATION); addClassPathToScope(classPath, scope, loader); return scope; } }
public boolean isApplicationLoader(IClassLoader loader) { return loader.getReference().equals(getLoader(APPLICATION)); }
/** * Utility function. Useful when parsing input. */ public MethodReference findMethod(Atom loader, String klass, Atom name, ImmutableByteArray desc) { if (desc == null) { throw new IllegalArgumentException("null desc"); } ClassLoaderReference clr = getLoader(loader); Descriptor ddesc = Descriptor.findOrCreate(languages.get(clr.getLanguage()), desc); TypeReference type = TypeReference.findOrCreate(clr, TypeName.string2TypeName(klass)); return MethodReference.findOrCreate(type, name, ddesc); }
/** * Utility function. Useful when parsing input. */ public MethodReference findMethod(Atom loader, String klass, Atom name, ImmutableByteArray desc) { if (desc == null) { throw new IllegalArgumentException("null desc"); } ClassLoaderReference clr = getLoader(loader); Descriptor ddesc = Descriptor.findOrCreate(languages.get(clr.getLanguage()), desc); TypeReference type = TypeReference.findOrCreate(clr, TypeName.string2TypeName(klass)); return MethodReference.findOrCreate(type, name, ddesc); }