Commit 771aacd3 by Michael Koch Committed by Michael Koch

AccessControlContext.java, [...]: Fixed javadocs.

2004-07-09  Michael Koch  <konqueror@gmx.de>

	* java/security/AccessControlContext.java,
	java/security/SecureClassLoader.java:
	Fixed javadocs.

From-SVN: r84383
parent 3d5f053c
2004-07-09 Michael Koch <konqueror@gmx.de> 2004-07-09 Michael Koch <konqueror@gmx.de>
* java/security/AccessControlContext.java,
java/security/SecureClassLoader.java:
Fixed javadocs.
2004-07-09 Michael Koch <konqueror@gmx.de>
* java/io/ObjectInputStream.java (readFields): Use long datatype * java/io/ObjectInputStream.java (readFields): Use long datatype
when shifting byte values more then 24 bits left. when shifting byte values more then 24 bits left.
......
/* AccessControlContext.java --- Access Control Context Class /* AccessControlContext.java --- Access Control Context Class
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -38,18 +38,18 @@ exception statement from your version. */ ...@@ -38,18 +38,18 @@ exception statement from your version. */
package java.security; package java.security;
/** /**
AccessControlContext makes system resource access decsion * AccessControlContext makes system resource access decsion
based on permission rights. * based on permission rights.
*
It is used for a specific context and has only one method * It is used for a specific context and has only one method
checkPermission. It is similar to AccessController except * checkPermission. It is similar to AccessController except
that it makes decsions based on the current context instead * that it makes decsions based on the current context instead
of the the current thread. * of the the current thread.
*
It is created by call AccessController.getContext method. * It is created by call AccessController.getContext method.
*
@author Mark Benvenuto * @author Mark Benvenuto
@since JDK 1.2 * @since 1.2
*/ */
public final class AccessControlContext public final class AccessControlContext
{ {
...@@ -57,11 +57,11 @@ public final class AccessControlContext ...@@ -57,11 +57,11 @@ public final class AccessControlContext
private DomainCombiner combiner; private DomainCombiner combiner;
/** /**
Construct a new AccessControlContext with the specified * Construct a new AccessControlContext with the specified
ProtectionDomains. <code>context</code> must not be * ProtectionDomains. <code>context</code> must not be
null and duplicates will be removed. * null and duplicates will be removed.
*
@param context The ProtectionDomains to use * @param context The ProtectionDomains to use
*/ */
public AccessControlContext(ProtectionDomain[]context) public AccessControlContext(ProtectionDomain[]context)
{ {
...@@ -91,12 +91,10 @@ public final class AccessControlContext ...@@ -91,12 +91,10 @@ public final class AccessControlContext
} }
/** /**
Construct a new AccessControlContext with the specified * Construct a new AccessControlContext with the specified
ProtectionDomains and DomainCombiner * ProtectionDomains and DomainCombiner
*
@param context The ProtectionDomains to use * @since 1.3
@since JDK 1.3
*/ */
public AccessControlContext(AccessControlContext acc, public AccessControlContext(AccessControlContext acc,
DomainCombiner combiner) DomainCombiner combiner)
...@@ -106,9 +104,9 @@ public final class AccessControlContext ...@@ -106,9 +104,9 @@ public final class AccessControlContext
} }
/** /**
Returns the Domain Combiner associated with the AccessControlContext * Returns the Domain Combiner associated with the AccessControlContext
*
@returns the DomainCombiner * @return the DomainCombiner
*/ */
public DomainCombiner getDomainCombiner() public DomainCombiner getDomainCombiner()
{ {
...@@ -116,12 +114,12 @@ public final class AccessControlContext ...@@ -116,12 +114,12 @@ public final class AccessControlContext
} }
/** /**
Determines whether or not the specific permission is granted * Determines whether or not the specific permission is granted
depending on the context it is within. * depending on the context it is within.
*
@param perm a permission to check * @param perm a permission to check
*
@throws AccessControlException if the permssion is not permitted * @throws AccessControlException if the permssion is not permitted
*/ */
public void checkPermission(Permission perm) throws AccessControlException public void checkPermission(Permission perm) throws AccessControlException
{ {
...@@ -133,14 +131,14 @@ public final class AccessControlContext ...@@ -133,14 +131,14 @@ public final class AccessControlContext
} }
/** /**
Checks if two AccessControlContexts are equal. * Checks if two AccessControlContexts are equal.
*
It first checks if obj is an AccessControlContext class, and * It first checks if obj is an AccessControlContext class, and
then checks if each ProtectionDomain matches. * then checks if each ProtectionDomain matches.
*
@param obj The object to compare this class to * @param obj The object to compare this class to
*
@return true if equal, false otherwise * @return true if equal, false otherwise
*/ */
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
...@@ -160,9 +158,9 @@ public final class AccessControlContext ...@@ -160,9 +158,9 @@ public final class AccessControlContext
} }
/** /**
Computes a hash code of this class * Computes a hash code of this class
*
@return a hash code representing this class * @return a hash code representing this class
*/ */
public int hashCode() public int hashCode()
{ {
......
/* SecureClassLoader.java --- A Secure Class Loader /* SecureClassLoader.java --- A Secure Class Loader
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -38,13 +38,13 @@ exception statement from your version. */ ...@@ -38,13 +38,13 @@ exception statement from your version. */
package java.security; package java.security;
/** /**
A Secure Class Loader for loading classes with additional * A Secure Class Loader for loading classes with additional
support for specifying code source and permissions when * support for specifying code source and permissions when
they are retrieved by the system policy handler. * they are retrieved by the system policy handler.
*
@since JDK 1.2 * @since 1.2
*
@author Mark Benvenuto * @author Mark Benvenuto
*/ */
public class SecureClassLoader extends ClassLoader public class SecureClassLoader extends ClassLoader
{ {
...@@ -64,18 +64,18 @@ public class SecureClassLoader extends ClassLoader ...@@ -64,18 +64,18 @@ public class SecureClassLoader extends ClassLoader
} }
/** /**
Creates a class using an array of bytes and a * Creates a class using an array of bytes and a
CodeSource. * CodeSource.
*
@param name the name to give the class. null if unknown. * @param name the name to give the class. null if unknown.
@param b the data representing the classfile, in classfile format. * @param b the data representing the classfile, in classfile format.
@param off the offset into the data where the classfile starts. * @param off the offset into the data where the classfile starts.
@param len the length of the classfile data in the array. * @param len the length of the classfile data in the array.
@param cs the CodeSource for the class or null when unknown. * @param cs the CodeSource for the class or null when unknown.
*
@return the class that was defined and optional CodeSource. * @return the class that was defined and optional CodeSource.
*
@exception ClassFormatError if the byte array is not in proper classfile format. * @exception ClassFormatError if the byte array is not in proper classfile format.
*/ */
protected final Class defineClass(String name, byte[] b, int off, int len, protected final Class defineClass(String name, byte[] b, int off, int len,
CodeSource cs) CodeSource cs)
...@@ -92,14 +92,13 @@ public class SecureClassLoader extends ClassLoader ...@@ -92,14 +92,13 @@ public class SecureClassLoader extends ClassLoader
} }
/** /**
Returns a PermissionCollection for the specified CodeSource. * Returns a PermissionCollection for the specified CodeSource.
The default implementation invokes * The default implementation invokes
java.security.Policy.getPermissions. * java.security.Policy.getPermissions.
*
This method is called by defineClass that takes a CodeSource * This method is called by defineClass that takes a CodeSource
arguement to build a proper ProtectionDomain for the class * arguement to build a proper ProtectionDomain for the class
being defined. * being defined.
*/ */
protected PermissionCollection getPermissions(CodeSource cs) protected PermissionCollection getPermissions(CodeSource cs)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment