Пример #1
0
 public JavaSource(
     VarargsMethod m1, VarargsMethod m2, TypeKind actual, ArgumentsArity argsArity) {
   super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
   source =
       source_template
           .replaceAll("#V1", m1.toString())
           .replaceAll("#V2", m2.toString())
           .replaceAll("#E", argsArity.asExpressionList(actual));
 }
Пример #2
0
  void test() throws Exception {
    for (TypeKind formal1 : TypeKind.values()) {
      VarargsMethod m1 = new VarargsMethod(formal1);
      for (TypeKind formal2 : TypeKind.values()) {
        VarargsMethod m2 = new VarargsMethod(formal2);
        for (TypeKind actual : TypeKind.values()) {
          for (ArgumentsArity argsArity : ArgumentsArity.values()) {
            compileAndCheck(m1, m2, actual, argsArity);
          }
        }
      }
    }

    System.out.println("Total checks made: " + checkCount);
    System.out.println("Bytecode checks made: " + bytecodeCheckCount);
  }