1 /* |
1 /* |
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
148 |
148 |
149 public static void main(String... args) throws Exception { |
149 public static void main(String... args) throws Exception { |
150 |
150 |
151 //create default shared JavaCompiler - reused across multiple compilations |
151 //create default shared JavaCompiler - reused across multiple compilations |
152 JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); |
152 JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); |
153 StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null); |
153 try (StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null)) { |
154 |
154 for (BoundKind boundKind : BoundKind.values()) { |
155 for (BoundKind boundKind : BoundKind.values()) { |
155 for (ConstructorKind constructorKind : ConstructorKind.values()) { |
156 for (ConstructorKind constructorKind : ConstructorKind.values()) { |
156 for (TypeArgumentKind declArgKind : TypeArgumentKind.values()) { |
157 for (TypeArgumentKind declArgKind : TypeArgumentKind.values()) { |
157 for (TypeArgArity arity : TypeArgArity.values()) { |
158 for (TypeArgArity arity : TypeArgArity.values()) { |
158 for (TypeArgumentKind useArgKind : TypeArgumentKind.values()) { |
159 for (TypeArgumentKind useArgKind : TypeArgumentKind.values()) { |
159 for (TypeArgumentKind diamondArgKind : TypeArgumentKind.values()) { |
160 for (TypeArgumentKind diamondArgKind : TypeArgumentKind.values()) { |
160 for (ArgumentKind argKind : ArgumentKind.values()) { |
161 for (ArgumentKind argKind : ArgumentKind.values()) { |
161 new GenericConstructorAndDiamondTest(boundKind, constructorKind, |
162 new GenericConstructorAndDiamondTest(boundKind, constructorKind, |
162 declArgKind, arity, useArgKind, diamondArgKind, argKind).run(comp, fm); |
163 declArgKind, arity, useArgKind, diamondArgKind, argKind).run(comp, fm); |
163 } |
164 } |
164 } |
165 } |
165 } |
166 } |
166 } |
167 } |
167 } |
168 } |
168 } |