2362N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 2362N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The AllPermission is a permission that implies all other permissions. 0N/A * <b>Note:</b> Granting AllPermission should be done with extreme care, 0N/A * as it implies all other permissions. Thus, it grants code the ability 0N/A * to run with security 0N/A * disabled. Extreme caution should be taken before granting such 0N/A * a permission to code. This permission should be used only during testing, 0N/A * or in extremely rare cases where an application or applet is 0N/A * completely trusted and adding the necessary permissions to the policy 0N/A * is prohibitively cumbersome. 0N/A * @see java.security.Permission * @see java.security.AccessController * @see java.security.Permissions * @see java.security.PermissionCollection * @see java.lang.SecurityManager * @author Roland Schemers * Creates a new AllPermission object. super(
"<all permissions>");
* Creates a new AllPermission object. This * constructor exists for use by the <code>Policy</code> object * to instantiate new Permission objects. * @param actions ignored. * Checks if the specified permission is "implied" by * this object. This method always returns true. * @param p the permission to check against. * Checks two AllPermission objects for equality. Two AllPermission * objects are always equal. * @param obj the object we are testing for equality with this object. * @return true if <i>obj</i> is an AllPermission, false otherwise. * Returns the hash code value for this object. * @return a hash code value for this object. * Returns the canonical string representation of the actions. * Returns a new PermissionCollection object for storing AllPermission * @return a new PermissionCollection object suitable for * storing AllPermissions. * A AllPermissionCollection stores a collection * of AllPermission permissions. AllPermission objects * must be stored in a manner that allows them to be inserted in any * order, but enable the implies function to evaluate the implies * method in an efficient (and consistent) manner. * @see java.security.Permission * @see java.security.Permissions * @author Roland Schemers // use serialVersionUID from JDK 1.2.2 for interoperability private boolean all_allowed;
// true if any all permissions have been added * Create an empty AllPermissions object. * Adds a permission to the AllPermissions. The key for the hash is * @param permission the Permission object to add. * @exception IllegalArgumentException - if the permission is not a * @exception SecurityException - if this AllPermissionCollection object * has been marked readonly throw new SecurityException(
"attempt to add a Permission to a readonly PermissionCollection");
* Check and see if this set of permissions implies the permissions * expressed in "permission". * @param p the Permission object to compare * @return always returns true. * Returns an enumeration of all the AllPermission objects in the * @return an enumeration of all the AllPermission objects.