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

Java example source code file (T8022765.java)

This example Java source code file (T8022765.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

ann, arrann, arrannc, arren, arrenc, arrprimitive, arrstr, arrstringc, override, primitive, string, stringc

The T8022765.java Java example source code

/**
 * @test /nodynamiccopyright/
 * @bug 8022765
 * @summary javac should not crash for incorrect attribute values
 * @build VerifyAnnotationsAttributed
 * @run main VerifyAnnotationsAttributed T8022765.java
 * @compile/fail/ref=T8022765.out -XDrawDiagnostics T8022765.java
 */
@Ann(@Override)
@Primitive(@Override)
@Str(@Override)
@En(@Override)
@ArrAnn(@Override)
@ArrPrimitive(@Override)
@ArrStr(@Override)
@ArrEn(@Override)
class AnnC { }

class PrimitiveC {
    private static final int C = 1;
    @Ann(C)
    @Primitive(C)
    @Str(C)
    @En(C)
    @ArrAnn(C)
    @ArrPrimitive(C)
    @ArrStr(C)
    @ArrEn(C)
    class I {
    }
}

class StringC {

    private static final String C = "";

    @Ann(C)
    @Primitive(C)
    @Str(C)
    @En(C)
    @ArrAnn(C)
    @ArrPrimitive(C)
    @ArrStr(C)
    @ArrEn(C)
    class I {
    }
}

@Ann(E.A)
@Primitive(E.A)
@Str(E.A)
@En(E.A)
@ArrAnn(E.A)
@ArrPrimitive(E.A)
@ArrStr(E.A)
@ArrEn(E.A)
class EnC { }

@Ann({@Override})
@Primitive({@Override})
@Str({@Override})
@En({@Override})
@ArrAnn({@Override})
@ArrPrimitive({@Override})
@ArrStr({@Override})
@ArrEn({@Override})
class ArrAnnC { }

class ArrPrimitiveC {
    private static final int C = 1;
    @Ann({C})
    @Primitive({C})
    @Str({C})
    @En({C})
    @ArrAnn({C})
    @ArrPrimitive({C})
    @ArrStr({C})
    @ArrEn({C})
    class I {
    }
}

class ArrStringC {
    private static final String C = "";
    @Ann({C})
    @Primitive({C})
    @Str({C})
    @En({C})
    @ArrAnn({C})
    @ArrPrimitive({C})
    @ArrStr({C})
    @ArrEn({C})
    class I {
    }
}

@Ann({E.A})
@Primitive({E.A})
@Str({E.A})
@En({E.A})
@ArrAnn({E.A})
@ArrPrimitive({E.A})
@ArrStr({E.A})
@ArrEn({E.A})
class ArrEnC { }

@interface Ann {
    Override value();
}

@interface Primitive {
    int value();
}

@interface Str {
    String value();
}

@interface En {
    E value();
}

@interface ArrAnn {
    Override[] value();
}

@interface ArrPrimitive {
    int[] value();
}

@interface ArrStr {
    String[] value();
}

@interface ArrEn {
    E[] value();
}

enum E {
    A;
}

Other Java examples (source code examples)

Here is a short list of links related to this Java T8022765.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.