RegClass.java revision 2100:933ba3f81a87
10SN/A/*
29048SN/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
30SN/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
40SN/A *
50SN/A * This code is free software; you can redistribute it and/or modify it
60SN/A * under the terms of the GNU General Public License version 2 only, as
72362SN/A * published by the Free Software Foundation.
80SN/A *
92362SN/A * This code is distributed in the hope that it will be useful, but WITHOUT
100SN/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
110SN/A * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
120SN/A * version 2 for more details (a copy is included in the LICENSE file that
130SN/A * accompanied this code).
140SN/A *
150SN/A * You should have received a copy of the GNU General Public License version
160SN/A * 2 along with this work; if not, write to the Free Software Foundation,
170SN/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
180SN/A *
190SN/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
200SN/A * or visit www.oracle.com if you need additional information or have any
212362SN/A * questions.
222362SN/A */
232362SN/A
240SN/Apackage pkg1;
250SN/A
260SN/Aimport java.io.Serializable;
270SN/Aimport java.util.Map;
280SN/A
290SN/A/**
300SN/A * @serial This is the serial tag's comment.
310SN/A */
320SN/Apublic class RegClass implements Serializable {
330SN/A
3413629Savstepan    /**
350SN/A     * Normal field in class.
360SN/A     */
3713629Savstepan    public String field;
380SN/A
390SN/A    /**
4013629Savstepan     * Normal field in class.
410SN/A     */
420SN/A    public String method$$;
430SN/A
440SN/A    /**
4513629Savstepan     * Filed staring with $.
460SN/A     */
470SN/A    public String $field;
480SN/A
490SN/A    /**
500SN/A     * Filed staring with underscore.
510SN/A     */
520SN/A    public String _field;
530SN/A
540SN/A    /**
559048SN/A     * Serial field
560SN/A     * @serial
570SN/A     */
580SN/A    public boolean t_e$t;
590SN/A
600SN/A    /**
619048SN/A     * Field in class with a $ in the name.
620SN/A     */
630SN/A    public String fieldInCla$$;
640SN/A
65    /**
66     * Field name as just an underscore.
67     */
68    public int _;
69
70    /**
71     * Field name as just a $.
72     */
73    public int $;
74
75    /**
76     * Field name with underscore and $.
77     */
78    public int _$;
79
80    /**
81     * Field name with $ and underscore.
82     */
83    public int $_;
84
85    /**
86     * An array.
87     */
88    public int arr[];
89
90    /**
91     * Another array.
92     */
93    public int[] arr1;
94
95    /**
96     * A constant field.
97     */
98    public static final int S_$$$$$INT = 0;
99
100    /**
101     * Another field.
102     */
103    public DeprMemClass d____mc;
104
105    /**
106     * An enum.
107     */
108    public static enum Te$t_Enum {
109        FLD_1,
110        $FLD2
111    };
112
113    /**
114     * A constructor.
115     */
116    public RegClass(String p, int i) {
117    }
118
119    /**
120     * Method in Class.
121     * @param p a string
122     */
123    public void _methodInClass(String p) {
124    }
125
126    /**
127     * Method in Class.
128     * @param p a string
129     * @param i an int
130     */
131    public void _methodInClas$(String p, int i) {
132    }
133
134    /**
135     * Method with $ in the name.
136     * @param p a string array
137     */
138    public void methodInCla$s(String[] p) {
139    }
140
141    /**
142     * Method with D[] as a parameter.
143     * @param p an array of D
144     */
145    public void methodD(D[] p) {
146    }
147
148    /**
149     * Method with $A as a parameter.
150     * @param p an object of $A
151     */
152    public void methodD($A p) {
153    }
154
155    /**
156     * Serial test.
157     * @serialData This is a serial data comment.
158     * @return null
159     */
160    protected Object $readResolve(){return null;}
161
162    /**
163     * Simple method.
164     */
165    public void method() {}
166
167    /**
168     * Generics.
169     */
170    public static <A> void foo(Map<A, Map<A, A>> map) {}
171
172    /**
173     * A nested class.
174     */
175    public class _NestedClas$ {}
176
177    /**
178     * Nested class D.
179     */
180    class D {}
181
182    /**
183     * Nested class $A.
184     */
185    class $A {}
186}
187