it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
class GrowableArrayContext extends AbstractContext
{
private static final int INITIAL_SIZE = 16;
-
+
private Class klass;
private Object array;
private int length;
-
+
GrowableArrayContext(String id, Class newClass)
{
setId(id);
System.arraycopy(array, 0, tmp, 0, length);
array = tmp;
}
-
+
try {
Array.set(array, length++, o);
} catch(IllegalArgumentException iae) {
System.arraycopy(array, 0, tmp, 0, length);
array = tmp;
}
-
+
return array;
}
try {
Array.set(array, index, o);
} catch(IllegalArgumentException iae) {
- throw new AssemblyException(iae);
+ throw new AssemblyException(iae);
}
}