com.ibm.wala.util.warnings.Warnings.clear()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中com.ibm.wala.util.warnings.Warnings.clear()方法的一些代码示例,展示了Warnings.clear()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Warnings.clear()方法的具体详情如下:
包路径:com.ibm.wala.util.warnings.Warnings
类名称:Warnings
方法名:clear

Warnings.clear介绍

暂无

代码示例

代码示例来源:origin: uber/NullAway

AnalysisCache cache = new AnalysisCacheImpl();
IClassHierarchy cha = ClassHierarchyFactory.makeWithPhantom(scope);
Warnings.clear();

代码示例来源:origin: wala/WALA

public AndroidAnalysisContext(ISCanDroidOptions options, String exclusions)
    throws IOException, IllegalArgumentException, ClassHierarchyException {
  
  this.options = options;
  scope = AndroidAnalysisScope.setUpAndroidAnalysisScope(options.getClasspath(), exclusions, getClass().getClassLoader(), options.getAndroidLibrary());
  
  cha = ClassHierarchyFactory.make(scope);
  /*
  if (options.classHierarchyWarnings()) {
    // log ClassHierarchy warnings
    for (Warning w : Iterator2Iterable.make(Warnings.iterator())) {
      
    }
  }
  */
  Warnings.clear();
}

代码示例来源:origin: wala/WALA

@AfterClass
public static void afterClass() throws Exception {
 Warnings.clear();
 scope = null;
 cha = null;
 cg = null;
 cache = null;
}

代码示例来源:origin: wala/WALA

@After
public void tearDown() throws Exception {
 Warnings.clear();
 if (ANALYZE_LEAKS) {
  HeapTracer.analyzeLeaks();
 }
}

代码示例来源:origin: wala/WALA

@AfterClass
public static void afterClass() throws Exception {
 Warnings.clear();
}
@Test public void test() {

代码示例来源:origin: wala/WALA

@AfterClass
public static void afterClass() throws Exception {
 Warnings.clear();
 scope = null;
 cha = null;
}

代码示例来源:origin: wala/WALA

@AfterClass
public static void afterClass() throws Exception {
 Warnings.clear();
 scope = null;
 cha = null;
 options = null;
 cache = null;
}

代码示例来源:origin: wala/WALA

System.out.println(cha.getNumberOfClasses() + " classes");
System.out.println(Warnings.asString());
Warnings.clear();
AnalysisOptions options = new AnalysisOptions();
Iterable<Entrypoint> entrypoints = Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, new String[] { mainClass } );

代码示例来源:origin: wala/WALA

System.out.println(cha.getNumberOfClasses() + " classes");
System.out.println(Warnings.asString());
Warnings.clear();
AnalysisOptions options = new AnalysisOptions();
Iterable<Entrypoint> entrypoints = entryClass != null ? makePublicEntrypoints(cha, entryClass) : Util.makeMainEntrypoints(scope, cha, mainClass);

代码示例来源:origin: wala/WALA

Warnings.clear();
Warnings.clear();

代码示例来源:origin: com.ibm.wala/com.ibm.wala.core

Warnings.clear();

代码示例来源:origin: wala/WALA

Warnings.clear();

代码示例来源:origin: wala/WALA

/**
 * test that when analyzing Reflect1.main(), there is no warning about
 * "Integer".
 */
@Test
public void testReflect1() throws WalaException, IllegalArgumentException, CancelException, IOException {
 AnalysisScope scope = findOrCreateAnalysisScope();
 IClassHierarchy cha = findOrCreateCHA(scope);
 Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
   TestConstants.REFLECT1_MAIN);
 AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
 Warnings.clear();
 CallGraphTest.doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);
 for (Warning w : Iterator2Iterable.make(Warnings.iterator())) {
  if (w.toString().indexOf("com/ibm/jvm") > 0) {
   continue;
  }
  if (w.toString().indexOf("Integer") >= 0) {
   Assert.assertTrue(w.toString(), false);
  }
 }
}

相关文章