作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.ibm.wala.properties.WalaProperties.getJ2SEJarFiles()
方法的一些代码示例,展示了WalaProperties.getJ2SEJarFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WalaProperties.getJ2SEJarFiles()
方法的具体详情如下:
包路径:com.ibm.wala.properties.WalaProperties
类名称:WalaProperties
方法名:getJ2SEJarFiles
[英]Determine the classpath noted in wala.properties for J2SE standard libraries If wala.properties cannot be loaded, returns jar files in boot classpath.
[中]确定wala中标注的类路径。如果wala是J2SE标准库的属性。无法加载属性,返回启动类路径中的jar文件。
代码示例来源:origin: wala/WALA
protected void instrument(String testJarLocation) throws IOException, ClassNotFoundException, InvalidClassFileException, FailureException {
if (! instrumentedJarBuilt) {
System.err.println("core data jar to instrument: " + testJarLocation);
Files.deleteIfExists(instrumentedJarLocation);
String rtJar = null;
for(String jar : WalaProperties.getJ2SEJarFiles()) {
if (jar.endsWith(File.separator + "rt.jar") || jar.endsWith(File.separator + "classes.jar")) {
rtJar = jar;
}
}
List<String> args = new ArrayList<>(Arrays.asList(testJarLocation, "-o", instrumentedJarLocation.toString()));
if (rtJar != null) {
args.addAll(Arrays.asList("--rt-jar", rtJar));
}
if (testPatchCalls) {
args.add("--patch-calls");
}
OfflineDynamicCallGraph.main(args.toArray(new String[0]));
Assert.assertTrue("expected to create " + instrumentedJarLocation, Files.exists(instrumentedJarLocation));
instrumentedJarBuilt = true;
}
}
代码示例来源:origin: wala/WALA
scope.setLoaderImpl(walaLoader, entryPathname);
} else if ("stdlib".equals(entryType)) {
String[] stdlibs = WalaProperties.getJ2SEJarFiles();
for (String stdlib : stdlibs) {
scope.addToScope(walaLoader, new JarFile(stdlib, false));
代码示例来源:origin: com.ibm.wala/com.ibm.wala.core
scope.setLoaderImpl(walaLoader, entryPathname);
} else if ("stdlib".equals(entryType)) {
String[] stdlibs = WalaProperties.getJ2SEJarFiles();
for (String stdlib : stdlibs) {
scope.addToScope(walaLoader, new JarFile(stdlib, false));
代码示例来源:origin: wala/WALA
AnalysisScope scope = new JavaSourceAnalysisScope();
String[] stdlibs = WalaProperties.getJ2SEJarFiles();
for (String stdlib : stdlibs) {
scope.addToScope(ClassLoaderReference.Primordial, new JarFile(stdlib));
我是一名优秀的程序员,十分优秀!