1 /*
   2  * Copyright (c) 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 import java.io.Serializable;
  27 import java.util.Map;
  28 
  29 /**
  30  * @serial This is the serial tag's comment.
  31  */
  32 public class RegClass implements Serializable {
  33 
  34     /**
  35      * Normal field in class.
  36      */
  37     public String field;
  38 
  39     /**
  40      * Normal field in class.
  41      */
  42     public String method$$;
  43 
  44     /**
  45      * Filed staring with $.
  46      */
  47     public String $field;
  48 
  49     /**
  50      * Filed staring with underscore.
  51      */
  52     public String _field;
  53 
  54     /**
  55      * Serial field
  56      * @serial
  57      */
  58     public boolean t_e$t;
  59 
  60     /**
  61      * Field in class with a $ in the name.
  62      */
  63     public String fieldInCla$$;
  64 
  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 }