From 9d5faaafe31ec7a7b78c9d4d3434efef5846bf83 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 14 Jul 2005 17:22:18 +0000 Subject: Class.java (getProtectionDomain): Merged javadoc from Classpath. * java/lang/Class.java (getProtectionDomain): Merged javadoc from Classpath. From-SVN: r102025 --- libjava/java/lang/Class.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libjava/java') diff --git a/libjava/java/lang/Class.java b/libjava/java/lang/Class.java index 1cee6d1..da84bfd 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 null code source + * and all permissions. A security check may be performed, with + * RuntimePermission("getProtectionDomain"). + * + * @return the protection domain + * @throws SecurityException if the security manager exists and the caller + * does not have RuntimePermission("getProtectionDomain"). + * @see RuntimePermission + * @since 1.2 + */ public ProtectionDomain getProtectionDomain() { SecurityManager sm = System.getSecurityManager(); -- cgit v1.1