test/langtools/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideATest.java
changeset 55387 761b86d5563d
parent 47216 71c04702a3d5
equal deleted inserted replaced
55386:2f4e214781a1 55387:761b86d5563d
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2019, 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.
    32  *          jdk.compiler
    32  *          jdk.compiler
    33  * @build   JavacTestingAbstractProcessor ElementRepAnnoTester
    33  * @build   JavacTestingAbstractProcessor ElementRepAnnoTester
    34  * @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideATest.java
    34  * @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideATest.java
    35  */
    35  */
    36 
    36 
    37 @BarInherited(value = 1)
    37 @BarInherited(1)
    38 @BarInherited(value = 2)
    38 @BarInherited(2)
    39 class B {}
    39 class B {}
    40 
    40 
    41 @ExpectedBase(
    41 @ExpectedBase(
    42         value = BarInherited.class,
    42         value = BarInherited.class,
    43         getAnnotation = "@BarInherited(value=3)",
    43         getAnnotation = "@BarInherited(3)",
    44         getAnnotationsByType = {"@BarInherited(value=3)"},
    44         getAnnotationsByType = {"@BarInherited(3)"},
    45         getAllAnnotationMirrors = {
    45         getAllAnnotationMirrors = {
    46             "@BarInherited(3)",
    46             "@BarInherited(3)",
    47             "@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
    47             "@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
    48             "ExpectedBase",
    48             "ExpectedBase",
    49             "ExpectedContainer"
    49             "ExpectedContainer"
    54             "ExpectedContainer"
    54             "ExpectedContainer"
    55         })
    55         })
    56 @ExpectedContainer(
    56 @ExpectedContainer(
    57         value = BarInheritedContainer.class,
    57         value = BarInheritedContainer.class,
    58         getAnnotation = "@BarInheritedContainer("
    58         getAnnotation = "@BarInheritedContainer("
    59         + "value={@BarInherited(value=1), @BarInherited(value=2)})",
    59         + "{@BarInherited(1), @BarInherited(2)})",
    60         getAnnotationsByType = {"@BarInheritedContainer("
    60         getAnnotationsByType = {"@BarInheritedContainer("
    61                 + "value={@BarInherited(value=1), @BarInherited(value=2)})"})
    61                 + "{@BarInherited(1), @BarInherited(2)})"})
    62 @BarInherited(value = 3)
    62 @BarInherited(3)
    63 class RepeatableOverrideATest extends B {}
    63 class RepeatableOverrideATest extends B {}