16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8005085 8008762 8008751 8013065 8015323 8015257
27 * @summary Type annotations on anonymous and inner class.
28 * Six TYPE_USE annotations are repeated(or not); Four combinations create
29 * four test files, and each results in the test class and 2 anonymous classes.
30 * Each element of these three classes is checked for expected number of the
31 * four annotation Attributes. Expected annotation counts depend on type of
32 * annotation place on type of element (a FIELD&TYPE_USE element on a field
33 * results in 2). Elements with no annotations expect 0.
34 * Source template is read in from testanoninner.template
35 *
36 * @modules jdk.compiler/com.sun.tools.classfile
37 */
38 import java.lang.annotation.*;
39 import java.io.*;
40 import java.util.List;
41 import java.util.LinkedList;
42 import com.sun.tools.classfile.*;
43 import java.nio.file.Files;
44 import java.nio.charset.*;
45 import java.io.File;
46 import java.io.IOException;
47
48
49 import java.lang.annotation.*;
50 import static java.lang.annotation.RetentionPolicy.*;
51 import static java.lang.annotation.ElementType.*;
52
53 /*
54 * A source template is read in and testname and annotations are inserted
55 * via replace().
56 */
|
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8005085 8008762 8008751 8013065 8015323 8015257
27 * @summary Type annotations on anonymous and inner class.
28 * Six TYPE_USE annotations are repeated(or not); Four combinations create
29 * four test files, and each results in the test class and 2 anonymous classes.
30 * Each element of these three classes is checked for expected number of the
31 * four annotation Attributes. Expected annotation counts depend on type of
32 * annotation place on type of element (a FIELD&TYPE_USE element on a field
33 * results in 2). Elements with no annotations expect 0.
34 * Source template is read in from testanoninner.template
35 *
36 * @modules jdk.jdeps/com.sun.tools.classfile
37 */
38 import java.lang.annotation.*;
39 import java.io.*;
40 import java.util.List;
41 import java.util.LinkedList;
42 import com.sun.tools.classfile.*;
43 import java.nio.file.Files;
44 import java.nio.charset.*;
45 import java.io.File;
46 import java.io.IOException;
47
48
49 import java.lang.annotation.*;
50 import static java.lang.annotation.RetentionPolicy.*;
51 import static java.lang.annotation.ElementType.*;
52
53 /*
54 * A source template is read in and testname and annotations are inserted
55 * via replace().
56 */
|