< prev index next >

test/langtools/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB1Test.java

Print this page




  23 
  24 /*
  25  * @test
  26  * @bug     8004822 8007961 8163113
  27  * @author  mnunez
  28  * @summary Language model api test basics for repeating annotations
  29  * @library /tools/javac/lib
  30  * @library supportingAnnotations
  31  * @modules java.compiler
  32  *          jdk.compiler
  33  * @build   JavacTestingAbstractProcessor ElementRepAnnoTester
  34  * @compile -processor ElementRepAnnoTester -proc:only
  35  * MixRepeatableAndOfficialContainerInheritedB1Test.java
  36  */
  37 
  38 @BarInheritedContainer(value = {@BarInherited(value = 1), @BarInherited(value = 2)})
  39 class M {}
  40 
  41 @ExpectedBase(
  42         value = BarInherited.class,
  43         getAnnotation = "@BarInherited(value=0)",
  44         getAnnotationsByType = {"@BarInherited(value=0)"},
  45         getAllAnnotationMirrors = {
  46             "@BarInherited(0)",
  47             "@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
  48             "ExpectedBase",
  49             "ExpectedContainer"
  50         },
  51         getAnnotationMirrors = {
  52             "@BarInherited(0)",
  53             "ExpectedBase",
  54             "ExpectedContainer"
  55         })
  56 @ExpectedContainer(
  57         value = BarInheritedContainer.class,
  58         getAnnotation = "@BarInheritedContainer("
  59         + "value={@BarInherited(value=1), @BarInherited(value=2)})",
  60         getAnnotationsByType = {"@BarInheritedContainer("
  61                 + "value={@BarInherited(value=1), @BarInherited(value=2)})"})
  62 @BarInherited(value = 0)
  63 class MixRepeatableAndOfficialContainerInheritedB1Test extends M {}


  23 
  24 /*
  25  * @test
  26  * @bug     8004822 8007961 8163113
  27  * @author  mnunez
  28  * @summary Language model api test basics for repeating annotations
  29  * @library /tools/javac/lib
  30  * @library supportingAnnotations
  31  * @modules java.compiler
  32  *          jdk.compiler
  33  * @build   JavacTestingAbstractProcessor ElementRepAnnoTester
  34  * @compile -processor ElementRepAnnoTester -proc:only
  35  * MixRepeatableAndOfficialContainerInheritedB1Test.java
  36  */
  37 
  38 @BarInheritedContainer(value = {@BarInherited(value = 1), @BarInherited(value = 2)})
  39 class M {}
  40 
  41 @ExpectedBase(
  42         value = BarInherited.class,
  43         getAnnotation = "@BarInherited(0)",
  44         getAnnotationsByType = {"@BarInherited(0)"},
  45         getAllAnnotationMirrors = {
  46             "@BarInherited(0)",
  47             "@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
  48             "ExpectedBase",
  49             "ExpectedContainer"
  50         },
  51         getAnnotationMirrors = {
  52             "@BarInherited(0)",
  53             "ExpectedBase",
  54             "ExpectedContainer"
  55         })
  56 @ExpectedContainer(
  57         value = BarInheritedContainer.class,
  58         getAnnotation = "@BarInheritedContainer("
  59         + "{@BarInherited(1), @BarInherited(2)})",
  60         getAnnotationsByType = {"@BarInheritedContainer("
  61                 + "{@BarInherited(1), @BarInherited(2)})"})
  62 @BarInherited(0)
  63 class MixRepeatableAndOfficialContainerInheritedB1Test extends M {}
< prev index next >