Tue, 31 Mar 2015 11:52:45 -0700
Merge
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 8025272 |
aoqi@0 | 4 | * @summary doclint needs to check for valid usage of at-value tag |
aoqi@0 | 5 | * @build DocLintTester |
aoqi@0 | 6 | * @run main DocLintTester -ref ValueTest.out ValueTest.java |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | |
aoqi@0 | 9 | /** */ |
aoqi@0 | 10 | public class ValueTest { |
aoqi@0 | 11 | /* |
aoqi@0 | 12 | * Tests for {@value} without a reference |
aoqi@0 | 13 | */ |
aoqi@0 | 14 | |
aoqi@0 | 15 | /** valid: {@value} */ |
aoqi@0 | 16 | public static final boolean cBoolean = false; |
aoqi@0 | 17 | |
aoqi@0 | 18 | /** valid: {@value} */ |
aoqi@0 | 19 | public static final byte cByte = 0; |
aoqi@0 | 20 | |
aoqi@0 | 21 | /** valid: {@value} */ |
aoqi@0 | 22 | public static final short cShort = 0; |
aoqi@0 | 23 | |
aoqi@0 | 24 | /** valid: {@value} */ |
aoqi@0 | 25 | public static final int cInt = 0; |
aoqi@0 | 26 | |
aoqi@0 | 27 | /** valid: {@value} */ |
aoqi@0 | 28 | public static final long cLong = 0L; |
aoqi@0 | 29 | |
aoqi@0 | 30 | /** valid: {@value} */ |
aoqi@0 | 31 | public static final float cFloat = 0.0f; |
aoqi@0 | 32 | |
aoqi@0 | 33 | /** valid: {@value} */ |
aoqi@0 | 34 | public static final double cDouble = 0.0; |
aoqi@0 | 35 | |
aoqi@0 | 36 | /** valid: {@value} */ |
aoqi@0 | 37 | public static final String cString = ""; |
aoqi@0 | 38 | |
aoqi@0 | 39 | /** invalid class C: {@value} */ |
aoqi@0 | 40 | public class C { } |
aoqi@0 | 41 | |
aoqi@0 | 42 | /** invalid enum E: {@value} */ |
aoqi@0 | 43 | public enum E { |
aoqi@0 | 44 | /** invalid enum constant E1: {@value} */ |
aoqi@0 | 45 | E1 |
aoqi@0 | 46 | } |
aoqi@0 | 47 | |
aoqi@0 | 48 | /** invalid field 1: {@value} */ |
aoqi@0 | 49 | public int f1; |
aoqi@0 | 50 | |
aoqi@0 | 51 | /** invalid field 2: {@value} */ |
aoqi@0 | 52 | public int f2 = 3; |
aoqi@0 | 53 | |
aoqi@0 | 54 | |
aoqi@0 | 55 | /* |
aoqi@0 | 56 | * Tests for {@value} with a reference |
aoqi@0 | 57 | */ |
aoqi@0 | 58 | |
aoqi@0 | 59 | /** valid: {@value Integer#SIZE} */ |
aoqi@0 | 60 | public int intRef; |
aoqi@0 | 61 | |
aoqi@0 | 62 | /** invalid method: {@value Object#toString} */ |
aoqi@0 | 63 | public int badMethod; |
aoqi@0 | 64 | |
aoqi@0 | 65 | /** invalid enum constant: {@value Thread.State#NEW} */ |
aoqi@0 | 66 | public int badEnum; |
aoqi@0 | 67 | } |