Source code: ClassLib/ibm13_linux/com/ibm/jvm/ExtendedSystem.java
1 // ExtendedSystem.java, created Sun Jun 9 6:56:00 2002 by joewhaley
2 // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3 // Licensed under the terms of the GNU LGPL; see COPYING for details.
4 package ClassLib.ibm13_linux.com.ibm.jvm;
5
6 import Clazz.jq_Array;
7 import Clazz.jq_Reference;
8 import Clazz.jq_Type;
9 import Run_Time.Reflection;
10
11 /**
12 * ExtendedSystem
13 *
14 * @author John Whaley <jwhaley@alum.mit.edu>
15 * @version $Id: ExtendedSystem.java,v 1.8 2003/05/12 10:04:54 joewhaley Exp $
16 */
17 public abstract class ExtendedSystem {
18
19 private static boolean isJVMUnresettable() { return false; }
20
21 private static java.lang.Object resizeArray(int newSize, java.lang.Object array, int startIndex, int size) {
22 jq_Array a = (jq_Array)jq_Reference.getTypeOf(array);
23 java.lang.Object o = a.newInstance(newSize);
24 java.lang.System.arraycopy(array, 0, o, startIndex, size);
25 return o;
26 }
27 private static java.lang.Object newArray(java.lang.Class elementType, int size, java.lang.Object enclosingObject) {
28 jq_Type t = Reflection.getJQType(elementType);
29 jq_Array a = t.getArrayTypeForElementType();
30 return a.newInstance(size);
31 }
32
33 }