diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-14 17:22:18 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-14 17:22:18 +0000 |
commit | 235815db8ce5ee1d8c033bad0f42e545d9d36dbf (patch) | |
tree | 85e0bea94995e605152a4b5efe085f9ae37d9ab6 /libjava/java | |
parent | 19895fc10b2219ca4c49de5d99ba73d3a024fbc9 (diff) | |
download | ppe42-gcc-235815db8ce5ee1d8c033bad0f42e545d9d36dbf.tar.gz ppe42-gcc-235815db8ce5ee1d8c033bad0f42e545d9d36dbf.zip |
* java/lang/Class.java (getProtectionDomain): Merged javadoc from
Classpath.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102025 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/Class.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libjava/java/lang/Class.java b/libjava/java/lang/Class.java index 1cee6d17262..da84bfd7f4c 100644 --- a/libjava/java/lang/Class.java +++ b/libjava/java/lang/Class.java @@ -769,6 +769,19 @@ public final class Class implements Serializable // can't add fields to java.lang.Class that are accessible from Java. private native ProtectionDomain getProtectionDomain0(); + /** + * Returns the protection domain of this class. If the classloader did not + * record the protection domain when creating this class the unknown + * protection domain is returned which has a <code>null</code> code source + * and all permissions. A security check may be performed, with + * <code>RuntimePermission("getProtectionDomain")</code>. + * + * @return the protection domain + * @throws SecurityException if the security manager exists and the caller + * does not have <code>RuntimePermission("getProtectionDomain")</code>. + * @see RuntimePermission + * @since 1.2 + */ public ProtectionDomain getProtectionDomain() { SecurityManager sm = System.getSecurityManager(); |