I'm committing the attached patch to HEAD to update the documentation with the recent VM changes.
Changelog:
2006-04-16 Andrew John Hughes <[EMAIL PROTECTED]>
* NEWS:
Mention generics additions to the VM interface.
* doc/vmintegration.texinfo:
Added information on VMClass 1.5 additions and
VMSecureRandom.
--
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.132
diff -u -3 -p -u -r1.132 NEWS
--- NEWS 14 Apr 2006 18:33:42 -0000 1.132
+++ NEWS 16 Apr 2006 23:58:23 -0000
@@ -37,6 +37,11 @@ Runtime interface changes:
* A new class, java.security.VMSecureRandom, is now available that is
used to generate random numbers for seeding cryptographically-secure
pseudo-random number generators.
+* VMClass and the reference implementations of Method, Constructor and Field
+ now include a number of 1.5 methods imported from the generics branch.
+ 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.
New in release 0.90 (March 6, 2006)
Index: doc/vmintegration.texinfo
===================================================================
RCS file: /cvsroot/classpath/classpath/doc/vmintegration.texinfo,v
retrieving revision 1.24
diff -u -3 -p -u -r1.24 vmintegration.texinfo
--- doc/vmintegration.texinfo 20 Mar 2006 01:08:43 -0000 1.24
+++ doc/vmintegration.texinfo 16 Apr 2006 23:58:24 -0000
@@ -275,9 +275,12 @@ VM should filter out non-public classes.
@item @code{getDeclaredConstructors(Class,boolean)} -- And constructors.
@item @code{getClassLoader(Class)} -- Returns the @code{ClassLoader} instance
which is responsible for the specified class.
[EMAIL PROTECTED] @code{forName(String)} -- The VM should create a @code{Class}
instance
-corresponding to the named class. As noted in @ref{VM Hooks}, the internal
-content of the instance is the responsibility of the VM.
[EMAIL PROTECTED] @code{forName(String, boolean, ClassLoader)} -- The VM should
create a
[EMAIL PROTECTED] instance corresponding to the named class. As noted in
[EMAIL PROTECTED] Hooks}, the internal content of the instance is the
+responsibility of the VM. The supplied class loader is recorded as that
+which loaded the class, and the boolean specifies whether or not to
+run the class initializer.
@item @code{isArray(Class)} -- Another property test, corresponding to a
class file flag.
@item @code{initialize(Class)} -- The VM should initialize the class fully,
@@ -308,15 +311,44 @@ information stored in the class file.
an inner or member class, or @code{null} if the instance refers to a top-level
class.
@end itemize
[EMAIL PROTECTED] 1.5
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED] @code{isSynthetic(Class)} -- Returns true if the flags for
this class
+mark it as synthetic.
[EMAIL PROTECTED] @code{isAnnotation(Class)} -- Returns true if the flags for
this class
+mark it as an annotation.
[EMAIL PROTECTED] @code{isEnum(Class)} -- Returns true if the flags for this
class
+mark it as an enumeration.
[EMAIL PROTECTED] @code{getSimpleName(Class)} -- Returns the simple name of the
class.
+A default implementation is provided, but a more efficient version may instead
+be provided by the VM.
[EMAIL PROTECTED] @code{getCanonicalName(Class)} -- Returns the canonical name
of the
+class. A default implementation is provided, but a more efficient
+version may instead be provided by the VM.
[EMAIL PROTECTED] @code{getEnclosingClass(Class)} -- Returns the immediately
enclosing
+class (null for a top-level class).
[EMAIL PROTECTED] @code{getEnclosingConstructor(Class)} -- Returns the
constructor
+which immediately encloses the supplied class.
[EMAIL PROTECTED] @code{getEnclosingMethod(Class)} -- Returns the method
+which immediately encloses the supplied class.
[EMAIL PROTECTED] @code{getClassSignature(Class)} -- Returns the generic
signature of
+the class or null if there isn't one.
[EMAIL PROTECTED] @code{isAnonymousClass(Class)} -- Returns true if the class
is an
+anonymous class.
[EMAIL PROTECTED] @code{isLocalClass(Class)} -- Returns true if the class is an
+local class.
[EMAIL PROTECTED] @code{isMemberClass(Class)} -- Returns true if the class is an
+member class.
[EMAIL PROTECTED] itemize
@end itemize
@node java.lang.VMObject, java.lang.VMClassLoader, java.lang.VMClass, java.lang
@subsection @code{java.lang.VMObject}
[EMAIL PROTECTED] is the bridge between the low level @code{Object} facilities
-such as making a clone, getting the class of the object and the wait/notify
-semantics. This is accomplished using the following @code{native}
-methods.
[EMAIL PROTECTED] is the bridge between the low level @code{Object}
+facilities such as making a clone, getting the class of the object and
+the wait/notify semantics. This is accomplished using the following
[EMAIL PROTECTED] methods.
@itemize @bullet
@item @code{getClass(Object)} -- Returns the @code{Class} instance for the
@@ -1004,14 +1036,14 @@ is optional.
@section java.security
The @code{java.security} package provides support for Java's security
-architecture. At present, @code{VMAccessController} represents the sole
-VM hook for this.
+architecture.
@menu
* java.security.VMAccessController::
+* java.security.VMSecureRandom::
@end menu
[EMAIL PROTECTED] java.security.VMAccessController,,java.security,java.security
[EMAIL PROTECTED]
java.security.VMAccessController,java.security.VMSecureRandom,java.security,java.security
@subsection @code{java.security.VMAccessController}
The @code{AccessController} is used to perform privileged actions. Its
@@ -1034,6 +1066,23 @@ arrays of classes and method names. The
an empty array, indicating that there are no permissions.
@end itemize
[EMAIL PROTECTED]
java.security.VMSecureRandom,,java.security.VMAccessController,,java.security
[EMAIL PROTECTED] @code{java.security.VMSecureRandom}
+
+The @code{VMSecureRandom} class is used to provide access to
+cryptographically secure random numbers. The default implementation
+of the class runs eight threads that increment counters in a tight
+loop, and XORs each counter to produce one byte of seed data. This is
+not very efficient, and is not guaranteed to be random (the thread
+scheduler is probably deterministic, after all). VM implementors
+should provide a version of this class, which implements the method
[EMAIL PROTECTED](byte[],int,int)}, so that it fills the buffer using
+a random seed from a system facility, such as a system entropy
+gathering device or hardware random number generator. The parameters
+are the usual set of buffer, offset and length and the method returns
+the number of bytes actually generated, which may be less than that
+requested.
+
@node java.net, java.nio, java.security, Classpath Hooks
@section java.net
signature.asc
Description: Digital signature
