本文整理了Java中soot.options.Options.process_dir()
方法的一些代码示例,展示了Options.process_dir()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.process_dir()
方法的具体详情如下:
包路径:soot.options.Options
类名称:Options
方法名:process_dir
暂无
代码示例来源:origin: Sable/soot
private void postCmdLineCheck() {
if (Options.v().classes().isEmpty() && Options.v().process_dir().isEmpty()) {
throw new CompilationDeathException(CompilationDeathException.COMPILATION_ABORTED, "No input classes specified!");
}
}
代码示例来源:origin: Sable/soot
public String defaultClassPath() {
// If we have an apk file on the process dir and do not have a src-prec
// option
// that loads APK files, we give a warning
if (Options.v().src_prec() != Options.src_prec_apk) {
for (String entry : Options.v().process_dir()) {
if (entry.toLowerCase().endsWith(".apk")) {
System.err.println("APK file on process dir, but chosen src-prec does not support loading APKs");
break;
}
}
}
if (Options.v().src_prec() == Options.src_prec_apk) {
return defaultAndroidClassPath();
} else {
return defaultJavaClassPath();
}
}
代码示例来源:origin: Sable/soot
public String getSootClassPath() {
if (sootClassPath == null) {
String optionscp = Options.v().soot_classpath();
if (optionscp != null && optionscp.length() > 0) {
sootClassPath = optionscp;
}
// if no classpath is given on the command line, take the default
if (sootClassPath == null || sootClassPath.isEmpty()) {
sootClassPath = defaultClassPath();
} else {
// if one is given...
if (Options.v().prepend_classpath()) {
// if the prepend flag is set, append the default classpath
sootClassPath += File.pathSeparator + defaultClassPath();
}
// else, leave it as it is
}
// add process-dirs
List<String> process_dir = Options.v().process_dir();
StringBuffer pds = new StringBuffer();
for (String path : process_dir) {
if (!sootClassPath.contains(path)) {
pds.append(path);
pds.append(File.pathSeparator);
}
}
sootClassPath = pds + sootClassPath;
}
return sootClassPath;
}
代码示例来源:origin: Sable/soot
List<String> classPathEntries
= new LinkedList<String>(Arrays.asList(Options.v().soot_classpath().split(File.pathSeparator)));
classPathEntries.addAll(Options.v().process_dir());
代码示例来源:origin: Sable/soot
/**
* Load the set of classes that soot needs, including those specified on the command-line. This is the standard way of
* initialising the list of classes soot should use.
*/
public void loadNecessaryClasses() {
loadBasicClasses();
for (String name : Options.v().classes()) {
loadNecessaryClass(name);
}
loadDynamicClasses();
if (Options.v().oaat()) {
if (Options.v().process_dir().isEmpty()) {
throw new IllegalArgumentException("If switch -oaat is used, then also -process-dir must be given.");
}
} else {
for (final String path : Options.v().process_dir()) {
for (String cl : SourceLocator.v().getClassesUnder(path)) {
SootClass theClass = loadClassAndSupport(cl);
if (!theClass.isPhantom) {
theClass.setApplicationClass();
}
}
}
}
prepareClasses();
setDoneResolving();
}
代码示例来源:origin: Sable/soot
for (String path : Options.v().process_dir()) {
代码示例来源:origin: ibinti/bugvm
/** Load the set of classes that soot needs, including those specified on the
* command-line. This is the standard way of initialising the list of
* classes soot should use.
*/
public void loadNecessaryClasses() {
loadBasicClasses();
Iterator<String> it = Options.v().classes().iterator();
while (it.hasNext()) {
String name = (String) it.next();
loadNecessaryClass(name);
}
loadDynamicClasses();
for( Iterator<String> pathIt = Options.v().process_dir().iterator(); pathIt.hasNext(); ) {
final String path = (String) pathIt.next();
for (String cl : SourceLocator.v().getClassesUnder(path)) {
loadClassAndSupport(cl).setApplicationClass();
}
}
prepareClasses();
// RoboVM note: In RoboVM we're never done resolving
//setDoneResolving();
}
代码示例来源:origin: com.bugvm/bugvm-soot
/** Load the set of classes that soot needs, including those specified on the
* command-line. This is the standard way of initialising the list of
* classes soot should use.
*/
public void loadNecessaryClasses() {
loadBasicClasses();
Iterator<String> it = Options.v().classes().iterator();
while (it.hasNext()) {
String name = (String) it.next();
loadNecessaryClass(name);
}
loadDynamicClasses();
for( Iterator<String> pathIt = Options.v().process_dir().iterator(); pathIt.hasNext(); ) {
final String path = (String) pathIt.next();
for (String cl : SourceLocator.v().getClassesUnder(path)) {
loadClassAndSupport(cl).setApplicationClass();
}
}
prepareClasses();
// RoboVM note: In RoboVM we're never done resolving
//setDoneResolving();
}
内容来源于网络,如有侵权,请联系作者删除!