Hi Mark
Maybe explicitly say "for calling the @code{InstrumentationImpl.callTransformers} when a class byte code is defined with @code{ClassLoader.defineClass}" So the vm implementer knows this is their job at the moment.
Allright added. I'm committing this in the main branch. 2005-12-04 Nicolas Geoffray <[EMAIL PROTECTED]> * doc/vmintegration.texinfo: Added subsection in the classpath hooks for the VMInstrumentationImpl class.
Index: doc/vmintegration.texinfo =================================================================== RCS file: /cvsroot/classpath/classpath/doc/vmintegration.texinfo,v retrieving revision 1.19 diff -u -r1.19 vmintegration.texinfo --- doc/vmintegration.texinfo 15 Jul 2005 09:04:46 -0000 1.19 +++ doc/vmintegration.texinfo 4 Dec 2005 20:45:03 -0000 @@ -226,6 +226,7 @@ * java.lang.VMRuntime:: * java.lang.VMString:: * java.lang.VMThread:: +* java.lang.VMInstrumentationImpl:: @end menu @node java.lang.VMClass, java.lang.VMObject ,java.lang,java.lang @@ -607,7 +608,7 @@ A VM may implement this differently by implementing this method, which is @code{static} and the only one in @code{VMString}. [EMAIL PROTECTED] java.lang.VMThread,, java.lang.VMString, java.lang [EMAIL PROTECTED] java.lang.VMThread,java.lang.VMInstrumentationImpl, java.lang.VMString, java.lang @subsection @code{java.lang.VMThread} @code{VMThread} provides the link between Java's threads and the platform @@ -682,6 +683,45 @@ having returned true, and is thus deprecated as a result. @end itemize @end itemize + [EMAIL PROTECTED] java.lang.VMInstrumentationImpl,, java.lang.VMThread, java.lang [EMAIL PROTECTED] @code{java.lang.VMInstrumentationImpl} + +The @code{java.lang.VMInstrumentationImpl} and [EMAIL PROTECTED] provides an implementation of the [EMAIL PROTECTED] interface. This interface is for java +1.5 and is only in the generics branch. +A @code{InstrumentationImpl} object should be given to any agent +given in the command line (see the @code{java.lang.instrument} package +documentation). A VM has to implement the static native methods of the [EMAIL PROTECTED] class. + [EMAIL PROTECTED] @bullet [EMAIL PROTECTED] @code{isRedefineClassesSupported()} -- Returns true if the JVM supports +class redefinition. [EMAIL PROTECTED] @code{redefineClasses()} -- Gives a set of classes with new bytecodes. +The VM must redefine the classes by reading the new bytecodes. [EMAIL PROTECTED] @code{getAllLoadedClass()} -- Returns an array of all loaded classes. [EMAIL PROTECTED] @code{getInitiatedClass()} -- Returns an array of all classes loaded +by a specific class loader. [EMAIL PROTECTED] @code{getObjectSize()} -- Gives the size of an object. [EMAIL PROTECTED] itemize + +When agents are defined, the VM has to call transformers of the [EMAIL PROTECTED] object each time a class is loaded, eg a call to [EMAIL PROTECTED] The @code{InstrumentationImpl} class defines +a method that has to be called before reading a class file in the VM. + [EMAIL PROTECTED] @bullet [EMAIL PROTECTED] @code{callTransformers} -- Calls each transformer registered to +the @code{InstrumentationImpl} object and returns a new bytecode file. [EMAIL PROTECTED] itemize + +No default implementation is provided in gnu classpath for the [EMAIL PROTECTED] methods. A default implementation will perhaps +be written, but it might break the @code{ClassLoader/VMClassLoader} interface +for calling the @code{InstrumentationImpl.callTransformers} when a class byte +code is defined with @code{ClassLoader.defineClass}. @node gnu.classpath, java.util, java.lang, Classpath Hooks @section @code{gnu.classpath}
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches