langtools/test/tools/doclint/ValueTest.java
author naoto
Tue, 29 Mar 2016 17:06:33 -0700
changeset 36739 145210aba850
parent 30730 d3ce7619db2c
permissions -rw-r--r--
8152704: jlink command line output/help message improvement Reviewed-by: mchung
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
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 20255
diff changeset
     5
 * @modules jdk.compiler/com.sun.tools.doclint
20255
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
     6
 * @build DocLintTester
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
     7
 * @run main DocLintTester -ref ValueTest.out ValueTest.java
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
/** */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    11
public class ValueTest {
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    12
    /*
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    13
     * Tests for {@value} without a reference
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
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    16
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    17
    public static final boolean cBoolean = false;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    18
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    19
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    20
    public static final byte cByte = 0;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    21
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    22
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    23
    public static final short cShort = 0;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    24
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    25
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    26
    public static final int cInt = 0;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    27
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    28
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    29
    public static final long cLong = 0L;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    30
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    31
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    32
    public static final float cFloat = 0.0f;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    33
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    34
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    35
    public static final double cDouble = 0.0;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    36
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    37
    /** valid: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    38
    public static final String cString = "";
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    39
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    40
    /** invalid class C: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    41
    public class C { }
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    42
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    43
    /** invalid enum E: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    44
    public enum E {
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    45
        /** invalid enum constant E1: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    46
        E1
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
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    49
    /** invalid field 1: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    50
    public int f1;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    51
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    52
    /** invalid field 2: {@value} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    53
    public int f2 = 3;
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
    /*
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    57
     * Tests for {@value} with a reference
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
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    60
    /** valid: {@value Integer#SIZE} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    61
    public int intRef;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    62
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    63
    /** invalid method: {@value Object#toString} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    64
    public int badMethod;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    65
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    66
    /** invalid enum constant: {@value Thread.State#NEW} */
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    67
    public int badEnum;
f8be1ea20e1a 8025272: doclint needs to check for valid usage of @value tag
jjg
parents:
diff changeset
    68
}