Index: java/lang/Class.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v
retrieving revision 1.17
diff -u -r1.17 Class.java
--- java/lang/Class.java	14 Mar 2004 14:17:55 -0000	1.17
+++ java/lang/Class.java	28 Mar 2004 18:29:55 -0000
@@ -105,7 +105,7 @@
     unknownProtectionDomain = new ProtectionDomain(null, permissions);
   }
 
-  transient final VMClass vmClass;
+  transient final Object vmdata;
 
   /** newInstance() caches the default constructor */
   private transient Constructor constructor;
@@ -114,9 +114,9 @@
    * Class is non-instantiable from Java code; only the VM can create
    * instances of this class.
    */
-  Class(VMClass vmClass)
+  Class(Object vmdata)
   {
-    this.vmClass = vmClass;
+    this.vmdata = vmdata;
   }
 
   /**
@@ -187,7 +187,7 @@
 	if (c != null)
 	  {
 	    if (initialize)
-	      c.vmClass.initialize();
+	      VMClass.initialize(c);
 	    return c;
 	  }
         throw new ClassNotFoundException(name);
@@ -197,7 +197,7 @@
     Class c = classloader.loadClass(name);
     classloader.resolveClass(c);
     if (initialize)
-      c.vmClass.initialize();
+      VMClass.initialize(c);
     return c;
   }
   
@@ -253,7 +253,7 @@
     if (name.startsWith("java.") || name.startsWith("gnu.java."))
       return null;
 
-    ClassLoader loader = vmClass.getClassLoader();
+    ClassLoader loader = VMClass.getClassLoader(this);
     // Check if we may get the classloader
     SecurityManager sm = System.getSecurityManager();
     if (sm != null)
@@ -279,7 +279,7 @@
    */
   public Class getComponentType()
   {
-    return vmClass.getComponentType ();
+    return VMClass.getComponentType (this);
   }
 
   /**
@@ -375,7 +375,7 @@
 
   Class[] getDeclaredClasses (boolean publicOnly)
   {
-    return vmClass.getDeclaredClasses (publicOnly);
+    return VMClass.getDeclaredClasses (this, publicOnly);
   }
 
   /**
@@ -398,7 +398,7 @@
 
   Constructor[] getDeclaredConstructors (boolean publicOnly)
   {
-    return vmClass.getDeclaredConstructors (publicOnly);
+    return VMClass.getDeclaredConstructors (this, publicOnly);
   }
   
   /**
@@ -446,7 +446,7 @@
 
   Field[] getDeclaredFields (boolean publicOnly)
   {
-    return vmClass.getDeclaredFields (publicOnly);
+    return VMClass.getDeclaredFields (this, publicOnly);
   }
 
   /**
@@ -504,7 +504,7 @@
 
   Method[] getDeclaredMethods (boolean publicOnly)
   {
-    return vmClass.getDeclaredMethods (publicOnly);
+    return VMClass.getDeclaredMethods (this, publicOnly);
   }
  
   /**
@@ -516,7 +516,7 @@
    */
   public Class getDeclaringClass()
   {
-    return vmClass.getDeclaringClass ();
+    return VMClass.getDeclaringClass (this);
   }
 
   /**
@@ -605,7 +605,7 @@
    */
   public Class[] getInterfaces()
   {
-    return vmClass.getInterfaces ();
+    return VMClass.getInterfaces (this);
   }
 
   private static final class MethodKey
@@ -834,7 +834,7 @@
    */
   public int getModifiers()
   {
-    return vmClass.getModifiers ();
+    return VMClass.getModifiers (this);
   }
   
   /**
@@ -858,7 +858,7 @@
    */
   public String getName()
   { 
-    return vmClass.getName ();
+    return VMClass.getName (this);
   }
 
   /**
@@ -965,7 +965,7 @@
    */
   public Class getSuperclass()
   {
-    return vmClass.getSuperclass ();
+    return VMClass.getSuperclass (this);
   }
   
   /**
@@ -976,11 +976,7 @@
    */
   public boolean isArray()
   {
-    int result = -1;
-    if ((result = vmClass.isArray ()) < 0)
-      return getName().charAt(0) == '[';
-
-    return result == 1;
+    return VMClass.isArray (this);
   }
   
   /**
@@ -999,7 +995,7 @@
    */
   public boolean isAssignableFrom(Class c)
   {
-    return vmClass.isAssignableFrom (c);
+    return VMClass.isAssignableFrom (this, c);
   }
  
   /**
@@ -1012,7 +1008,7 @@
    */
   public boolean isInstance(Object o)
   {
-    return vmClass.isInstance (o);
+    return VMClass.isInstance (this, o);
   }
   
   /**
@@ -1023,7 +1019,7 @@
    */
   public boolean isInterface()
   {
-    return vmClass.isInterface ();
+    return VMClass.isInterface (this);
   }
   
   /**
@@ -1047,7 +1043,7 @@
    */
   public boolean isPrimitive()
   {
-    return vmClass.isPrimitive ();
+    return VMClass.isPrimitive (this);
   }
   
   /**
Index: vm/reference/java/lang/VMClass.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMClass.java,v
retrieving revision 1.8
diff -u -r1.8 VMClass.java
--- vm/reference/java/lang/VMClass.java	17 Apr 2003 12:32:29 -0000	1.8
+++ vm/reference/java/lang/VMClass.java	28 Mar 2004 18:30:10 -0000
@@ -1,5 +1,5 @@
 /* VMClass.java -- VM Specific Class methods
-   Copyright (C) 2003 Free Software Foundation
+   Copyright (C) 2003, 2004 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -37,7 +37,6 @@
 
 package java.lang;
 
-import gnu.classpath.RawData;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -68,17 +67,6 @@
   private native void step7();
   private native void step8();
 
-  /**
-   * Pointer to VM internal class structure.
-   */
-
-  private final RawData vmData;  
-
-  private VMClass(RawData vmData) 
-  { 
-    this.vmData = vmData;
-  }
-
   private void initialize(int thread) throws InterruptedException
   {
     Error error;
@@ -160,7 +148,7 @@
    * @return whether o is an instance of this class
    * @since 1.1
    */
-  native boolean isInstance(Object o);
+  static native boolean isInstance(Class clazz, Object o);
 
   /**
    * Discover whether an instance of the Class parameter would be an
@@ -176,7 +164,7 @@
    * @throws NullPointerException if c is null
    * @since 1.1
    */
-  native boolean isAssignableFrom(Class c);
+  static native boolean isAssignableFrom(Class clazz, Class c);
 
   /**
    * Check whether this class is an interface or not.  Array types are not
@@ -184,7 +172,7 @@
    *
    * @return whether this class is an interface or not
    */
-  native boolean isInterface();
+  static native boolean isInterface(Class clazz);
 
   /**
    * Return whether this class is a primitive type.  A primitive type class
@@ -205,7 +193,7 @@
    * @see Void#TYPE
    * @since 1.1
    */
-  native boolean isPrimitive();
+  static native boolean isPrimitive(Class clazz);
 
   /**
    * Get the name of this class, separated by dots for package separators.
@@ -226,7 +214,7 @@
    *
    * @return the name of this class
    */
-  native String getName();
+  static native String getName(Class clazz);
 
   /**
    * Get the direct superclass of this class.  If this is an interface,
@@ -235,7 +223,7 @@
    *
    * @return the direct superclass of this class
    */
-  native Class getSuperclass();
+  static native Class getSuperclass(Class clazz);
 
   /**
    * Get the interfaces this class <EM>directly</EM> implements, in the
@@ -245,7 +233,7 @@
    *
    * @return the interfaces this class directly implements
    */
-  native Class[] getInterfaces();
+  static native Class[] getInterfaces(Class clazz);
 
   /**
    * If this is an array, get the Class representing the type of array.
@@ -257,7 +245,7 @@
    * @see Array
    * @since 1.1
    */
-  native Class getComponentType();
+  static native Class getComponentType(Class clazz);
 
   /**
    * Get the modifiers of this class.  These can be decoded using Modifier,
@@ -271,7 +259,7 @@
    * @see Modifer
    * @since 1.1
    */
-  native int getModifiers();
+  static native int getModifiers(Class clazz);
 
   /**
    * If this is a nested or inner class, return the class that declared it.
@@ -280,28 +268,28 @@
    * @return the declaring class of this class
    * @since 1.1
    */
-  native Class getDeclaringClass();
+  static native Class getDeclaringClass(Class clazz);
 
   /**
    * Like <code>getDeclaredClasses()</code> but without the security checks.
    *
    * @param pulicOnly Only public classes should be returned
    */
-  native Class[] getDeclaredClasses(boolean publicOnly);
+  static native Class[] getDeclaredClasses(Class clazz, boolean publicOnly);
 
   /**
    * Like <code>getDeclaredFields()</code> but without the security checks.
    *
    * @param pulicOnly Only public fields should be returned
    */
-  native Field[] getDeclaredFields(boolean publicOnly);
+  static native Field[] getDeclaredFields(Class clazz, boolean publicOnly);
 
   /**
    * Like <code>getDeclaredMethods()</code> but without the security checks.
    *
    * @param pulicOnly Only public methods should be returned
    */
-  native Method[] getDeclaredMethods(boolean publicOnly);
+  static native Method[] getDeclaredMethods(Class clazz, boolean publicOnly);
 
   /**
    * Like <code>getDeclaredConstructors()</code> but without
@@ -309,14 +297,14 @@
    *
    * @param pulicOnly Only public constructors should be returned
    */
-  native Constructor[] getDeclaredConstructors(boolean publicOnly);
+  static native Constructor[] getDeclaredConstructors(Class clazz, boolean publicOnly);
 
   /**
    * Return the class loader of this class.
    *
    * @return the class loader
    */
-  native ClassLoader getClassLoader();
+  static native ClassLoader getClassLoader(Class clazz);
 
   /**
    * VM implementors are free to make this method a noop if 
@@ -335,10 +323,10 @@
   /**
    * Return whether this class is an array type.
    *
-   * @return 1 if this class is an array type, 0 otherwise, -1 if unsupported
+   * @return true if this class is an array type
    * operation
    */
-  native int isArray();
+  static native boolean isArray(Class clazz);
 
   /**
    * This method should trigger class initialization (if the
@@ -347,7 +335,7 @@
    * @throws ExceptionInInitializerError if an exception
    *         occurs during initialization
    */
-  native void initialize();
+  static native void initialize(Class clazz);
 
   /**
    * Load an array class.
