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