31 * @modules jdk.compiler/com.sun.tools.javac.api
32 * jdk.compiler/com.sun.tools.javac.main
33 * jdk.compiler/com.sun.tools.sjavac
34 * @ignore Requires dependency code to deal with in-method dependencies.
35 * @build Wrapper toolbox.ToolBox
36 * @run main Wrapper IncCompileFullyQualifiedRef
37 */
38
39 import java.util.Map;
40
41 import toolbox.ToolBox;
42
43 public class IncCompileFullyQualifiedRef extends SJavacTester {
44 public static void main(String... args) throws Exception {
45 IncCompileFullyQualifiedRef fr = new IncCompileFullyQualifiedRef();
46 fr.test();
47 }
48
49 void test() throws Exception {
50 clean(TEST_ROOT);
51 ToolBox tb = new ToolBox();
52 tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
53 "package alfa.omega; public class A { "+
54 " public final static int DEFINITION = 18; "+
55 " public void hello() { }"+
56 "}");
57 tb.writeFile(GENSRC.resolve("beta/B.java"),
58 "package beta; public class B { "+
59 " public void world() { alfa.omega.A a; }"+
60 "}");
61
62 compile(GENSRC.toString(),
63 "-d", BIN.toString(),
64 "--state-dir=" + BIN,
65 "-j", "1",
66 "--log=debug");
67 Map<String,Long> previous_bin_state = collectState(BIN);
68
69 // Change pubapi of A, this should trigger a recompile of B.
70 tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
71 "package alfa.omega; public class A { "+
|
31 * @modules jdk.compiler/com.sun.tools.javac.api
32 * jdk.compiler/com.sun.tools.javac.main
33 * jdk.compiler/com.sun.tools.sjavac
34 * @ignore Requires dependency code to deal with in-method dependencies.
35 * @build Wrapper toolbox.ToolBox
36 * @run main Wrapper IncCompileFullyQualifiedRef
37 */
38
39 import java.util.Map;
40
41 import toolbox.ToolBox;
42
43 public class IncCompileFullyQualifiedRef extends SJavacTester {
44 public static void main(String... args) throws Exception {
45 IncCompileFullyQualifiedRef fr = new IncCompileFullyQualifiedRef();
46 fr.test();
47 }
48
49 void test() throws Exception {
50 clean(TEST_ROOT);
51 tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
52 "package alfa.omega; public class A { "+
53 " public final static int DEFINITION = 18; "+
54 " public void hello() { }"+
55 "}");
56 tb.writeFile(GENSRC.resolve("beta/B.java"),
57 "package beta; public class B { "+
58 " public void world() { alfa.omega.A a; }"+
59 "}");
60
61 compile(GENSRC.toString(),
62 "-d", BIN.toString(),
63 "--state-dir=" + BIN,
64 "-j", "1",
65 "--log=debug");
66 Map<String,Long> previous_bin_state = collectState(BIN);
67
68 // Change pubapi of A, this should trigger a recompile of B.
69 tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
70 "package alfa.omega; public class A { "+
|