alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (T6881115.java)

This example Java source code file (T6881115.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

annotation, string, t6881115, target

The T6881115.java Java example source code

import java.lang.annotation.Target;
import java.lang.annotation.ElementType;

/*
 * @test /nodynamiccopyright/
 * @bug     6881115 6976649
 * @summary javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
 * @author  mcimadamore
 * @compile/fail/ref=T6881115.out -XDrawDiagnostics T6881115.java
 */

@Target({ElementType.TYPE, ElementType.TYPE_PARAMETER, ElementType.ANNOTATION_TYPE})
@interface A {
    B b() default @B(b2 = 1, b2 = 2);
    B[] b_arr() default {@B(), @B(b2 = 1, b2 = 2)};
}

@interface B {
    String b1();
    int b2();
}

@A(b = @B(b2 = 1, b2 = 2),
   b_arr = {@B(), @B(b2 = 1, b2 = 2)})
class T6881115<@A(b = @B(b2 = 1, b2 = 2),
                  b_arr = {@B(), @B(b2 = 1, b2 = 2)}) X> {}

Other Java examples (source code examples)

Here is a short list of links related to this Java T6881115.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.