summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-04-17 12:22:18 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-04-17 12:22:18 +0000
commitaa3c4260fa88d14d90e37bba2a734a4c50f5a575 (patch)
treeb3cdaa33041a2c93928d1c31288ad139098f25e8 /doc
parentc2b83830f4a7f4c76e1ae6f607ad91d38d3fc401 (diff)
downloadclasspath-aa3c4260fa88d14d90e37bba2a734a4c50f5a575.tar.gz
2006-04-17 Andrew John Hughes <gnu_andrew@member.fsf.org>
* NEWS: Mention merge of instrumentation classes. * doc/vmintegration.texinfo: Move instrumentation to correct section.
Diffstat (limited to 'doc')
-rw-r--r--doc/vmintegration.texinfo104
1 files changed, 57 insertions, 47 deletions
diff --git a/doc/vmintegration.texinfo b/doc/vmintegration.texinfo
index 3bea08486..b1acaf34d 100644
--- a/doc/vmintegration.texinfo
+++ b/doc/vmintegration.texinfo
@@ -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 string being @code{intern}ed.
A VM may implement this differently by implementing this method,
which is @code{static} and the only one in @code{VMString}.
-@node java.lang.VMThread,java.lang.VMInstrumentationImpl, java.lang.VMString, java.lang
+@node 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 deprecated as a result.
@end itemize
@end itemize
-@node java.lang.VMInstrumentationImpl, java.lang.VMMath, java.lang.VMThread, java.lang
-@subsection @code{java.lang.VMInstrumentationImpl}
-
-The @code{java.lang.VMInstrumentationImpl} and
-@code{java.lang.InstrumentationImpl} classes provide an implementation of the
-@code{java.lang.instrument.Instrument} 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
-@code{VMClassLoader.instrumenter} to this object. The VM should implement the
-static native methods of the @code{VMInstrumentationImpl} class.
-
-@itemize @bullet
-@item @code{isRedefineClassesSupported()} -- Returns true if the JVM supports
-class redefinition.
-@item @code{redefineClasses()} -- Gives a set of classes with new bytecodes.
-The VM must redefine the classes by reading the new bytecodes.
-@item @code{getAllLoadedClass()} -- Returns an array of all loaded classes.
-@item @code{getInitiatedClass()} -- Returns an array of all classes loaded
-by a specific class loader.
-@item @code{getObjectSize()} -- Gives the size of an object.
-@end 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
-@code{VMClassLoader.defineClass} 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
-@code{Instrumentation.redefineClasses} 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
-@code{InstrumentationImpl.callTransformers} method.
-
-@node java.lang.VMMath, , java.lang.VMInstrumentationImpl, java.lang
+@node 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 represented by the @code{static}
@code{native} method, @code{select(int[],int[],int[],long)}, and a default
implementation of this is provided.
-@node java.lang.reflect, Classpath Callbacks, gnu.java.nio, Classpath Hooks
+@node 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-primitive array of a
particular class and size. The default implementation simply passes
the job down to the standard JNI function, @code{NewObjectArray}.
-@node Classpath Callbacks, , java.lang.reflect, Classpath Hooks
+@node gnu.java.lang, Classpath Callbacks, java.lang.reflect, Classpath Hooks
+@section @code{gnu.java.lang}
+
+@code{gnu.java.lang} provides VM interfaces for the GNU
+implementations of features in java.lang. Currently, this includes the
+implementation of instrumentation.
+
+@menu
+* gnu.java.lang.VMInstrumentationImpl::
+@end menu
+
+@node gnu.java.lang.VMInstrumentationImpl,,,gnu.java.lang
+@subsection @code{gnu.java.lang.VMInstrumentationImpl}
+
+The @code{gnu.java.lang.VMInstrumentationImpl} and
+@code{gnu.java.lang.InstrumentationImpl} classes provide an implementation of the
+@code{java.lang.instrument.Instrument} 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
+@code{VMClassLoader.instrumenter} to this object. The VM should implement the
+static native methods of the @code{VMInstrumentationImpl} class.
+
+@itemize @bullet
+@item @code{isRedefineClassesSupported()} -- Returns true if the JVM supports
+class redefinition.
+@item @code{redefineClasses()} -- Gives a set of classes with new bytecodes.
+The VM must redefine the classes by reading the new bytecodes.
+@item @code{getAllLoadedClass()} -- Returns an array of all loaded classes.
+@item @code{getInitiatedClass()} -- Returns an array of all classes loaded
+by a specific class loader.
+@item @code{getObjectSize()} -- Gives the size of an object.
+@end 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
+@code{VMClassLoader.defineClass} 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
+@code{Instrumentation.redefineClasses} 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
+@code{InstrumentationImpl.callTransformers} method.
+
+@node 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: