View Javadoc

1   // Class.java, created Sat Mar 29  2:34:35 2003 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 joeq.ClassLib.ibm13_win32.java.lang;
5   
6   import joeq.Class.PrimordialClassLoader;
7   
8   /***
9    * Class
10   *
11   * @author  John Whaley <jwhaley@alum.mit.edu>
12   * @version $Id: Class.java 1456 2004-03-09 22:01:46Z jwhaley $
13   */
14  public class Class {
15  
16      private static native Class forName0(java.lang.String name, boolean initialize,
17                                           java.lang.ClassLoader loader)
18          throws ClassNotFoundException;
19      private native java.lang.Object newInstance0()
20          throws InstantiationException, IllegalAccessException;
21  
22      private static Class forName1(java.lang.String name)
23          throws ClassNotFoundException
24      {
25          // TODO: is this the correct classloader to use?
26          java.lang.ClassLoader loader = PrimordialClassLoader.loader;
27          return forName0(name, true, loader);
28      }
29      
30      private java.lang.Object newInstance2(java.lang.Class ccls)
31          throws InstantiationException, IllegalAccessException
32      {
33          // TODO: what do we do with the extra ccls argument?
34          return newInstance0();
35      }
36      
37  }