33import java .lang .reflect .Array ;
44import java .lang .reflect .InvocationTargetException ;
55
6- /** New object, new array, or inner class style allocation with body. */
6+ /**
7+ * New object, new array, or inner class style allocation with body.
8+ */
79class BSHAllocationExpression extends SimpleNode {
10+ private static int innerClassCount = 0 ;
11+
812 BSHAllocationExpression (int id ) {
913 super (id );
1014 }
1115
12- private static int innerClassCount = 0 ;
13-
1416 public Object eval (CallStack callstack , Interpreter interpreter ) throws EvalError {
1517 // type is either a class name or a primitive type
1618 SimpleNode type = (SimpleNode ) jjtGetChild (0 );
@@ -208,7 +210,7 @@ when VOID the prescribed array dimensions (defined and undefined)
208210 /**
209211 * Create an array of the dimensions specified in dimensionsNode. dimensionsNode may contain a
210212 * number of "undefined" as well as "defined" dimensions.
211- *
213+ * <p>
212214 * <p>Background: in Java arrays are implemented in arrays-of-arrays style where, for example, a
213215 * two dimensional array is a an array of arrays of some base type. Each dimension-type has a
214216 * Java class type associated with it... so if foo = new int[5][5] then the type of foo is int
@@ -217,7 +219,7 @@ when VOID the prescribed array dimensions (defined and undefined)
217219 * if foo = new int [5][]; then foo[0] == null //true; and can later be assigned with the
218220 * appropriate type, e.g. foo[0] = new int[5]; (See Learning Java, O'Reilly & Associates more
219221 * background).
220- *
222+ * <p>
221223 * <p>To create an array with undefined trailing dimensions using the reflection API we must use
222224 * an array type to represent the lower order (undefined) dimensions as the "base" type for the
223225 * array creation... Java will then create the correct type by adding the dimensions of the base
0 commit comments