I'm committing the attached patch to update the documentation to match the recent changes to the instrumentation stuff.
Changelog: -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... }
Index: NEWS
===================================================================
RCS file: /cvsroot/classpath/classpath/NEWS,v
retrieving revision 1.133
diff -u -3 -p -u -r1.133 NEWS
--- NEWS 17 Apr 2006 00:08:20 -0000 1.133
+++ NEWS 17 Apr 2006 12:03:21 -0000
@@ -42,6 +42,8 @@ Runtime interface changes:
These are all optional (in the sense that the methods associated with them
merely fail on use if the VM doesn't provide them, rather than the
VM failing altogether), but VMs should aim to support them where possible.
+* The implementation of java.lang.instrument has been merged to the main
+ branch from the generics branch.
New in release 0.90 (March 6, 2006)
Index: doc/vmintegration.texinfo
===================================================================
RCS file: /cvsroot/classpath/classpath/doc/vmintegration.texinfo,v
retrieving revision 1.26
diff -u -3 -p -u -r1.26 vmintegration.texinfo
--- doc/vmintegration.texinfo 17 Apr 2006 01:01:19 -0000 1.26
+++ doc/vmintegration.texinfo 17 Apr 2006 12:03:22 -0000
@@ -201,6 +201,7 @@ implementation.
* java.nio.channels::
* gnu.java.nio::
* java.lang.reflect::
+* gnu.java.lang::
* Classpath Callbacks::
@end menu
@@ -227,7 +228,6 @@ become operable.
* java.lang.VMRuntime::
* java.lang.VMString::
* java.lang.VMThread::
-* java.lang.VMInstrumentationImpl::
* java.lang.VMMath::
@end menu
@@ -642,7 +642,7 @@ A new mapping is created for each new st
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.VMInstrumentationImpl,
java.lang.VMString, java.lang
[EMAIL PROTECTED] java.lang.VMThread, java.lang.VMMath, java.lang.VMString,
java.lang
@subsection @code{java.lang.VMThread}
@code{VMThread} provides the link between Java's threads and the platform
@@ -718,49 +718,7 @@ having returned true, and is thus deprec
@end itemize
@end itemize
[EMAIL PROTECTED] java.lang.VMInstrumentationImpl, java.lang.VMMath,
java.lang.VMThread, java.lang
[EMAIL PROTECTED] @code{java.lang.VMInstrumentationImpl}
-
-The @code{java.lang.VMInstrumentationImpl} and
[EMAIL PROTECTED] classes provide 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 created by the VM when agents
-are given in the command line (see the @code{java.lang.instrument} package
-documentation). The VM has to set the static field
[EMAIL PROTECTED] to this object. The VM should implement the
-static native methods of the @code{VMInstrumentationImpl} 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
-
-Instrumentation allows to modify the bytecode of a class before it gets read
-by the VM. In GNU Classpath, the @code{ClassLoader.defineClass} method calls
-the @code{VMClassLoader.defineClassWithTransformers} method which first checks
-if @code{VMClassLoader.instrumenter} is @code{null}. If it's the case, it
-directly calls @code{VMClassLoader.defineClass}. If it's not the case, the
-method calls at first the @code{InstrumentationImpl.callTransformers} method,
-which calls each transformer registered to the @code{InstrumentationImpl}
-object and returns a new bytecode array. Then, it calls the
[EMAIL PROTECTED] method with this new bytecode array.
-
-The second use of instrumentation is to redefine a class after it has been
-loaded by the VM. This is done in the Java application by calling the
[EMAIL PROTECTED] method of the standard interface on
-a @code{Instrumentation} object. The @code{InstrumentationImpl.redefineClasses}
-method calls the @code{VMInstrumentationImpl.redefineClasses} native method
-which must be implemented by the VM. The implementation should call the
[EMAIL PROTECTED] method.
-
[EMAIL PROTECTED] java.lang.VMMath, , java.lang.VMInstrumentationImpl, java.lang
[EMAIL PROTECTED] java.lang.VMMath,, java.lang.VMThread, java.lang
@subsection @code{java.lang.VMMath}
The @code{VMMath} class provides a series of native methods
@@ -1225,7 +1183,7 @@ operation to be performed. This is repr
@code{native} method, @code{select(int[],int[],int[],long)}, and a default
implementation of this is provided.
[EMAIL PROTECTED] java.lang.reflect, Classpath Callbacks, gnu.java.nio,
Classpath Hooks
[EMAIL PROTECTED] java.lang.reflect, gnu.java.lang, gnu.java.nio, Classpath
Hooks
@section @code{java.lang.reflect}
@code{java.lang.reflect} provides the interface to Java's reflection
facilities. Via reflection, programmers can obtain type information about
@@ -1243,7 +1201,59 @@ which the VM uses to generate a new non-
particular class and size. The default implementation simply passes
the job down to the standard JNI function, @code{NewObjectArray}.
[EMAIL PROTECTED] Classpath Callbacks, , java.lang.reflect, Classpath Hooks
[EMAIL PROTECTED] gnu.java.lang, Classpath Callbacks, java.lang.reflect,
Classpath Hooks
[EMAIL PROTECTED] @code{gnu.java.lang}
+
[EMAIL PROTECTED] provides VM interfaces for the GNU
+implementations of features in java.lang. Currently, this includes the
+implementation of instrumentation.
+
[EMAIL PROTECTED]
+* gnu.java.lang.VMInstrumentationImpl::
[EMAIL PROTECTED] menu
+
[EMAIL PROTECTED] gnu.java.lang.VMInstrumentationImpl,,,gnu.java.lang
[EMAIL PROTECTED] @code{gnu.java.lang.VMInstrumentationImpl}
+
+The @code{gnu.java.lang.VMInstrumentationImpl} and
[EMAIL PROTECTED] classes provide an implementation of the
[EMAIL PROTECTED] interface.
+A @code{InstrumentationImpl} object should be created by the VM when agents
+are given in the command line (see the @code{java.lang.instrument} package
+documentation). The VM has to set the static field
[EMAIL PROTECTED] to this object. The VM should implement the
+static native methods of the @code{VMInstrumentationImpl} 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
+
+Instrumentation allows to modify the bytecode of a class before it gets read
+by the VM. In GNU Classpath, the @code{ClassLoader.defineClass} method calls
+the @code{VMClassLoader.defineClassWithTransformers} method which first checks
+if @code{VMClassLoader.instrumenter} is @code{null}. If it's the case, it
+directly calls @code{VMClassLoader.defineClass}. If it's not the case, the
+method calls at first the @code{InstrumentationImpl.callTransformers} method,
+which calls each transformer registered to the @code{InstrumentationImpl}
+object and returns a new bytecode array. Then, it calls the
[EMAIL PROTECTED] method with this new bytecode array.
+
+The second use of instrumentation is to redefine a class after it has been
+loaded by the VM. This is done in the Java application by calling the
[EMAIL PROTECTED] method of the standard interface on
+a @code{Instrumentation} object. The @code{InstrumentationImpl.redefineClasses}
+method calls the @code{VMInstrumentationImpl.redefineClasses} native method
+which must be implemented by the VM. The implementation should call the
[EMAIL PROTECTED] method.
+
[EMAIL PROTECTED] Classpath Callbacks, , gnu.java.lang, Classpath Hooks
Some of the classes you implement for the VM will need to call back to
package-private methods in Classpath:
signature.asc
Description: Digital signature
