diff options
author | Tom Tromey <tromey@cygnus.com> | 1999-12-20 23:05:21 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-12-20 23:05:21 +0000 |
commit | bcc7684092d4ad419002e53e8cbd27aff8089d05 (patch) | |
tree | 77086c97c1c6352c03e1b63301b28172ce2f98c5 /libjava/java | |
parent | 7205485e64ce66df47b2e8a58e0ba885188b1486 (diff) | |
download | gcc-bcc7684092d4ad419002e53e8cbd27aff8089d05.zip gcc-bcc7684092d4ad419002e53e8cbd27aff8089d05.tar.gz gcc-bcc7684092d4ad419002e53e8cbd27aff8089d05.tar.bz2 |
Modifier.java (STRICT): New constant.
* java/lang/reflect/Modifier.java (STRICT): New constant.
(isStrict): New method.
(toString): Added `strict'.
From-SVN: r31040
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/reflect/Method.java | 3 | ||||
-rw-r--r-- | libjava/java/lang/reflect/Modifier.java | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/libjava/java/lang/reflect/Method.java b/libjava/java/lang/reflect/Method.java index e7f697f..e0571f8 100644 --- a/libjava/java/lang/reflect/Method.java +++ b/libjava/java/lang/reflect/Method.java @@ -17,8 +17,7 @@ package java.lang.reflect; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Incomplete: needs a private constructor, and - * invoke() needs to be finished. + * Status: Incomplete: invoke() needs to be finished. */ public final class Method extends AccessibleObject implements Member diff --git a/libjava/java/lang/reflect/Modifier.java b/libjava/java/lang/reflect/Modifier.java index 5128531..efe7029 100644 --- a/libjava/java/lang/reflect/Modifier.java +++ b/libjava/java/lang/reflect/Modifier.java @@ -16,7 +16,7 @@ details. */ /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Believed complete and correct to version 1.1 + * Status: Believed complete and correct to version 1.2. */ package java.lang.reflect; @@ -34,6 +34,7 @@ public class Modifier public static final int NATIVE = 0x100; public static final int INTERFACE = 0x200; public static final int ABSTRACT = 0x400; + public static final int STRICT = 0x800; // This is only used by the C++ code, so it is not public. static final int ALL_FLAGS = 0x7ff; @@ -78,6 +79,11 @@ public class Modifier return (mod & STATIC) != 0; } + public static boolean isStrict (int mod) + { + return (mod & STRICT) != 0; + } + public static boolean isSynchronized (int mod) { return (mod & SYNCHRONIZED) != 0; @@ -124,6 +130,8 @@ public class Modifier r.append("synchronized "); if (isInterface (mod)) r.append("interface "); + if (isStrict (mod)) + r.append("strict "); // Trim trailing space. int l = r.length(); |