I just thought better of the idea of gnu.vm.VMData: it'll just be
java.lang.Object. It's basically just supposed to be a placeholder that the
VM can use to put data corresponding to the Object. The only Objects
supporting this at the present time are Class, Method, Constructor and
Field. The data field and the constructors for these things are all
private, so that only the VM can access them.
--John Keiser
> -----Original Message-----
> From: John Keiser [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 20, 1998 5:25 PM
> To: Classpath
> Subject: List of VM-dependent stuff
>
>
> Here is a list I have compiled of all the calls we need to
> the VM, and of
> all the calls they should need to make back to us.
>
> --------------------------------------------
> Callouts from us to VM (stuff they provide):
> --------------------------------------------
>
> Helpers not tied to a specific method:
> Class getPrimitiveClass(String primName) # used in
> java.lang.<Wrapper
> Class>.TYPE initializer
> Properties getDefaultProperties() # used in java.lang.System
> initialization to get VM-specific system properties; the
> essential ones the
> VM should support will be defined in the JavaDoc for this method
> Class[] getClassesOnStack() # used in
> java.lang.SecurityManager for checks
> Method[] getMethodsOnStack() # used in
> java.lang.SecurityManager for checks
>
> By class (if we go the gnu.vm.* route, these will still be the essential
> methods):
> java.lang.Class:
> Class[] getInterfaces()
> ClassLoader getClassLoader()
> Class forName(String name)
> int getModifiers()
> Class[] getClasses()
> Class[] getDeclaredClasses()
> Constructor getConstructor(Class[] args)
> Constructor getDeclaredConstructor(Class[] args)
> Constructor[] getConstructors()
> Constructor[] getDeclaredConstructors()
> Method getMethod(String name,Class[] args)
> Method getDeclaredMethod(String name,Class[] args)
> Method[] getMethods()
> Method[] getDeclaredMethods()
> Field getField(String name)
> Field getDeclaredField(String name)
> Field[] getFields()
> Field[] getDeclaredFields()
>
> java.lang.ClassLoader:
> void resolveClass(Class c)
> void defineClass(String name, byte[] bytes, int start, int len)
>
> java.lang.Object:
> void notify()
> void notifyAll()
> void wait(long ms, int ns)
>
> java.lang.Runtime:
> void gc()
> void runFinalization()
> void runFinalizersOnExit(boolean on)
> long freeMemory()
> long totalMemory()
> void traceInstructions(boolean on)
> void traceMethodCalls(boolean on)
> void exit(int status)
> void load(String libFilename)
>
> java.lang.System:
> void arraycopy(Object a, int start, Object b, int start, int len)
> void identityHashCode(Object o)
>
> ------------------------------------------
> Callouts from VM to us (stuff we provide):
> ------------------------------------------
> java.lang.Class.Class(String name, Class superclass,
> gnu.vm.VMData d) # use
> for FindClass, forName, etc.
> java.lang.Class.Class.data
> # use
> for internal stuff, if desired
> java.lang.reflect.Constructor.Constructor(gnu.vm.VMData
> data) # use
> for ToReflectedMethod
> java.lang.reflect.Method.Method(gnu.vm.VMData data)
> # use
> for ToReflectedMethod
> java.lang.reflect.Field.Field(gnu.vm.VMData data)
> # use
> for ToReflectedField
> java.lang.reflect.Constructor.data
> # use
> for FromReflectedMethod
> java.lang.reflect.Method.data
> # use
> for FromReflectedMethod
> java.lang.reflect.Field.data
> # use
> for FromReflectedMethod
>
>
> The main goal of these methods is to absolutely minimize the dependence
> between classpath and the VM, thus making both their job and ours easier.
>
> --John Keiser
>
>