Class1.java revision 2061:9e884d3ddb0b
122375Spst/*
222375Spst * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
350476Speter * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
422375Spst *
522375Spst * This code is free software; you can redistribute it and/or modify it
622375Spst * under the terms of the GNU General Public License version 2 only, as
729991Sache * published by the Free Software Foundation.
829991Sache *
922375Spst * This code is distributed in the hope that it will be useful, but WITHOUT
1022375Spst * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1122375Spst * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1222375Spst * version 2 for more details (a copy is included in the LICENSE file that
1322375Spst * accompanied this code).
1422375Spst *
1522375Spst * You should have received a copy of the GNU General Public License version
1622375Spst * 2 along with this work; if not, write to the Free Software Foundation,
1722375Spst * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1822375Spst *
1929970Sache * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2029978Sache * or visit www.oracle.com if you need additional information or have any
2155955Srgrimes * questions.
2222375Spst */
2322375Spst
2429971Sachepackage pkg1;
2522375Spst
2640202Speter/**
2740202Speter * Result:  {@value TEST_2_PASSES}
2840202Speter */
2922375Spstpublic class Class1 {
3022375Spst
3122375Spst    /**
3222375Spst     * Result:  {@value}
33     */
34    public static final String TEST_1_PASSES = "Test 1 passes";
35
36    public static final String TEST_2_PASSES  = "Test 2 passes";
37    public static final String TEST_3_PASSES  = "Test 3 passes";
38    public static final String TEST_4_PASSES  = "Test 4 passes";
39    public static final String TEST_5_PASSES  = "Test 5 passes";
40    public static final String TEST_6_PASSES  = "Test 6 passes";
41    public static final String TEST_7_PASSES  = "Test 7 passes";
42    public static final String TEST_8_PASSES  = "Test 8 passes";
43    public static final String TEST_9_PASSES  = "Test 9 passes";
44    public static final String TEST_10_PASSES = "Test 10 passes";
45    public static final String TEST_11_PASSES = "Test 11 passes";
46
47    /**
48     * Invalid (non-constant field): {@value}
49     */
50    public static String TEST_12_ERROR = "Test 12 generates an error message";
51
52    /**
53     * Invalid (null): {@value}
54     */
55    public static final String NULL = null;
56
57    /**
58     * Result:  {@value TEST_3_PASSES}
59     */
60    public int field;
61
62    /**
63     * Result:  {@value TEST_4_PASSES}
64     */
65    public Class1() {}
66
67    /**
68     * Result:  {@value TEST_5_PASSES}
69     */
70    public void method() {}
71
72    /**
73     * Result:  {@value TEST_12_ERROR}
74     */
75    public void invalidValueTag1() {}
76
77    /**
78     * Result:  {@value}
79     */
80    public void invalidValueTag2() {}
81
82    /**
83     * Result:  {@value NULL}
84     */
85    public void testNullConstant() {}
86
87    /**
88     * Result:  {@value pkg1.Class1#TEST_6_PASSES}
89     */
90    public class NestedClass{}
91}
92