test/langtools/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideBTest.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 RepeatableOverrideBTest.java
    34  * @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideBTest.java
    35  */
    35  */
    36 
    36 
    37 @BarInherited(value = 0)
    37 @BarInherited(0)
    38 class C {}
    38 class C {}
    39 
    39 
    40 @ExpectedBase(
    40 @ExpectedBase(
    41         value = BarInherited.class,
    41         value = BarInherited.class,
    42         getAnnotation = "@BarInherited(value=0)",
    42         getAnnotation = "@BarInherited(0)",
    43         getAnnotationsByType = {
    43         getAnnotationsByType = {
    44             "@BarInherited(value=1)",
    44             "@BarInherited(1)",
    45             "@BarInherited(value=2)"
    45             "@BarInherited(2)"
    46         },
    46         },
    47         getAllAnnotationMirrors = {
    47         getAllAnnotationMirrors = {
    48             "@BarInherited(0)",
    48             "@BarInherited(0)",
    49             "@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
    49             "@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
    50             "ExpectedBase",
    50             "ExpectedBase",
    56             "ExpectedContainer"
    56             "ExpectedContainer"
    57         })
    57         })
    58 @ExpectedContainer(
    58 @ExpectedContainer(
    59         value = BarInheritedContainer.class,
    59         value = BarInheritedContainer.class,
    60         getAnnotation = "@BarInheritedContainer("
    60         getAnnotation = "@BarInheritedContainer("
    61         + "value={@BarInherited(value=1), @BarInherited(value=2)})",
    61         + "{@BarInherited(1), @BarInherited(2)})",
    62         getAnnotationsByType = {"@BarInheritedContainer("
    62         getAnnotationsByType = {"@BarInheritedContainer("
    63                 + "value={@BarInherited(value=1), @BarInherited(value=2)})"})
    63                 + "{@BarInherited(1), @BarInherited(2)})"})
    64 @BarInherited(value = 1)
    64 @BarInherited(1)
    65 @BarInherited(value = 2)
    65 @BarInherited(2)
    66 class RepeatableOverrideBTest extends C {}
    66 class RepeatableOverrideBTest extends C {}