langtools/test/tools/javac/annotations/repeatingAnnotations/MultipleAnnoMixedOrder.java
author jjg
Fri, 02 Nov 2012 14:35:57 -0700
changeset 14371 5652321f1ae4
child 15356 cf312dc54c60
permissions -rw-r--r--
7169362: JDK8: Write compiler tests for repeating annotations for JDK8 Reviewed-by: darcy, jjg Contributed-by: sonali.goel@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14371
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     1
/*
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     4
 *
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     8
 *
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    13
 * accompanied this code).
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    14
 *
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    18
 *
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    21
 * questions.
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    22
 */
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    23
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    24
/**
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    25
 * @test
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    26
 * @bug     7169362
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    27
 * @author  sogoel
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    28
 * @summary Repeatable annotations in random order
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    29
 * @compile MultipleAnnoMixedOrder.java
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    30
 */
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    31
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    32
import java.lang.annotation.ContainedBy;
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    33
import java.lang.annotation.ContainerFor;
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    34
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    35
@ContainedBy(FooContainer.class)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    36
@interface Foo {
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    37
    int getNumbers();
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    38
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    39
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    40
@ContainerFor(Foo.class)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    41
@interface FooContainer {
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    42
  Foo[] value();
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    43
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    44
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    45
@ContainedBy(BazContainer.class)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    46
@interface Baz {
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    47
    String getStr();
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    48
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    49
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    50
@ContainerFor(Baz.class)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    51
@interface BazContainer {
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    52
  Baz[] value();
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    53
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    54
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    55
@Foo(getNumbers=1)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    56
@Baz(getStr="hello")
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    57
@Foo(getNumbers=2)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    58
@Baz(getStr="world")
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    59
public class MultipleAnnoMixedOrder  {}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    60