diff options
author | Tom Tromey <tromey@redhat.com> | 2002-06-11 17:33:22 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-06-11 17:33:22 +0000 |
commit | 419831367ffe80b3e7902b86eb38e7f8c396852c (patch) | |
tree | ebbe68b8e8e326e400af4e79b545b2dd31fd6942 /libjava/java/lang/VMClassLoader.java | |
parent | c6226a7e2aabd8d28a282bcad0b0c62767fb6a17 (diff) | |
download | gcc-419831367ffe80b3e7902b86eb38e7f8c396852c.zip gcc-419831367ffe80b3e7902b86eb38e7f8c396852c.tar.gz gcc-419831367ffe80b3e7902b86eb38e7f8c396852c.tar.bz2 |
Class.h (Class::desiredAssertionStatus): Declare.
* java/lang/Class.h (Class::desiredAssertionStatus): Declare.
(Class::getPackagePortion): Likewise.
* java/lang/Class.java (desiredAssertionStatus): New method from
Classpath.
(getPackagePortion): Likewise.
* java/lang/VMClassLoader.java (defaultAssertionStatus,
packageAssertionStatus, classAssertionStatus): New methods from
Classpath.
* java/lang/ClassLoader.java (defaultAssertionStatus,
systemPackageAssertionStatus, packageAssertionStatus,
systemClassAssertionStatus, classAssertionStatus): New fields from
Classpath.
(setDefaultAssertionStatus, setPackageAssertionStatus,
setClassAssertionStatus, clearAssertionStatus): New methods from
Classpath.
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added AssertionError.java.
* java/lang/AssertionError.java: New from Classpath.
From-SVN: r54517
Diffstat (limited to 'libjava/java/lang/VMClassLoader.java')
-rw-r--r-- | libjava/java/lang/VMClassLoader.java | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/libjava/java/lang/VMClassLoader.java b/libjava/java/lang/VMClassLoader.java index 5ff7ae8..445272b 100644 --- a/libjava/java/lang/VMClassLoader.java +++ b/libjava/java/lang/VMClassLoader.java @@ -1,6 +1,6 @@ /* * java.lang.ClassLoader: part of the Java Class Libraries project. - * Copyright (C) 1998, 2001 Free Software Foundation + * Copyright (C) 1998, 2001, 2002 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,6 +20,8 @@ package java.lang; +import java.util.*; + /** * java.lang.VMClassLoader is a package-private helper for VMs to implement * on behalf of java.lang.ClassLoader. @@ -59,4 +61,47 @@ class VMClassLoader { * @param type code for the primitive type. */ static native Class getPrimitiveClass(char type); + + /** + * The system default for assertion status. This is used for all system + * classes (those with a null ClassLoader), as well as the initial value for + * every ClassLoader's default assertion status. + * + * XXX - Not implemented yet; this requires native help. + * + * @return the system-wide default assertion status + */ + static final boolean defaultAssertionStatus() + { + return true; + } + + /** + * The system default for package assertion status. This is used for all + * ClassLoader's packageAssertionStatus defaults. It must be a map of + * package names to Boolean.TRUE or Boolean.FALSE, with the unnamed package + * represented as a null key. + * + * XXX - Not implemented yet; this requires native help. + * + * @return a (read-only) map for the default packageAssertionStatus + */ + static final Map packageAssertionStatus() + { + return new HashMap(); + } + + /** + * The system default for class assertion status. This is used for all + * ClassLoader's classAssertionStatus defaults. It must be a map of + * class names to Boolean.TRUE or Boolean.FALSE + * + * XXX - Not implemented yet; this requires native help. + * + * @return a (read-only) map for the default classAssertionStatus + */ + static final Map classAssertionStatus() + { + return new HashMap(); + } } |