|
Java example source code file (CantAnnotatePackages.java)
The CantAnnotatePackages.java Java example source code/* * @test /nodynamiccopyright/ * @bug 1234567 * @summary The parts of a fully-qualified type can't be annotated. * @author Werner Dietl * @compile/fail/ref=CantAnnotatePackages.out -XDrawDiagnostics CantAnnotatePackages.java */ import java.lang.annotation.*; import java.util.List; class CantAnnotatePackages { // Before a package component: @TA java.lang.Object of1; // These result in a different error. // TODO: should this be unified? List<@TA java.lang.Object> of2; java. @TA lang.Object of3; List<java. @TA lang.Object> of4; // TODO: also note the order of error messages. } @Target(ElementType.TYPE_USE) @interface TA { } Other Java examples (source code examples)Here is a short list of links related to this Java CantAnnotatePackages.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.