From 419831367ffe80b3e7902b86eb38e7f8c396852c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 11 Jun 2002 17:33:22 +0000 Subject: 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 --- libjava/java/lang/VMClassLoader.java | 47 +++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'libjava/java/lang/VMClassLoader.java') diff --git a/libjava/java/lang/VMClassLoader.java b/libjava/java/lang/VMClassLoader.java index 5ff7ae86b21..445272b1bba 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(); + } } -- cgit v1.2.3