1 /*
2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.
8  *
9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 package pkg1;
25 
26 /**
27  * Result:  {@value TEST_2_PASSES}
28  */
29 public class Class1 {
30 
31     /**
32      * 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      */
Class1()65     public Class1() {}
66 
67     /**
68      * Result:  {@value TEST_5_PASSES}
69      */
method()70     public void method() {}
71 
72     /**
73      * Result:  {@value TEST_12_ERROR}
74      */
invalidValueTag1()75     public void invalidValueTag1() {}
76 
77     /**
78      * Result:  {@value}
79      */
invalidValueTag2()80     public void invalidValueTag2() {}
81 
82     /**
83      * Result:  {@value NULL}
84      */
testNullConstant()85     public void testNullConstant() {}
86 
87     /**
88      * Result:  {@value pkg1.Class1#TEST_6_PASSES}
89      */
90     public class NestedClass{}
91 }
92