File: AnnotationTypeElementModifiers.java

package info (click to toggle)
libnb-javaparser-java 9%2B2018-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 65,172 kB
  • sloc: java: 440,096; xml: 6,359; sh: 865; makefile: 314
file content (46 lines) | stat: -rw-r--r-- 1,020 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * @test /nodynamiccopyright/
 * @bug 8028428
 * @summary Test that only 'public' and 'abstract' elements compile
 * @compile/fail/ref=AnnotationTypeElementModifiers.out -XDrawDiagnostics AnnotationTypeElementModifiers.java
 */

public @interface AnnotationTypeElementModifiers {
    // First 4 should work
    public int A();
    public int AA() default  1;

    abstract int B();
    abstract int BB() default  1;

    // These shouldn't work
    private int C();
    private int CC() default  1;

    protected int D();
    protected int DD() default  1;

    static int E();
    static int EE() default  1;

    final int F();
    final int FF() default  1;

    synchronized int H();
    synchronized int HH() default  1;

    volatile int I();
    volatile int II() default  1;

    transient int J();
    transient int JJ() default  1;

    native int K();
    native int KK() default  1;

    strictfp float L();
    strictfp float LL() default  0.1f;

    default int M();
    default int MM() default  1;
}