Package org.osgi.framework
Class PackagePermissionCollection
- java.lang.Object
-
- java.security.PermissionCollection
-
- org.osgi.framework.PackagePermissionCollection
-
- All Implemented Interfaces:
java.io.Serializable
final class PackagePermissionCollection extends java.security.PermissionCollection
Stores a set ofPackagePermission
permissions.- See Also:
Permission
,Permissions
,PermissionCollection
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
all_allowed
Boolean saying if "*" is in the collection.private java.util.Map
filterPermissions
Table of permissions with filter expressions.private java.util.Map
permissions
Table of permissions with names.private static java.io.ObjectStreamField[]
serialPersistentFields
(package private) static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description PackagePermissionCollection()
Create an empty PackagePermissions object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.security.Permission permission)
Adds a permission to this permission collection.java.util.Enumeration
elements()
Returns an enumeration of allPackagePermission
objects in the container.boolean
implies(java.security.Permission permission)
Determines if the specified permissions implies the permissions expressed inpermission
.private void
readObject(java.io.ObjectInputStream in)
private void
writeObject(java.io.ObjectOutputStream out)
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
permissions
private transient java.util.Map permissions
Table of permissions with names.
-
all_allowed
private boolean all_allowed
Boolean saying if "*" is in the collection.
-
filterPermissions
private java.util.Map filterPermissions
Table of permissions with filter expressions.
-
serialPersistentFields
private static final java.io.ObjectStreamField[] serialPersistentFields
-
-
Method Detail
-
add
public void add(java.security.Permission permission)
Adds a permission to this permission collection.- Specified by:
add
in classjava.security.PermissionCollection
- Parameters:
permission
- ThePackagePermission
object to add.- Throws:
java.lang.IllegalArgumentException
- If the specified permission is not aPackagePermission
instance or was constructed with a Bundle object.java.lang.SecurityException
- If thisPackagePermissionCollection
object has been marked read-only.
-
implies
public boolean implies(java.security.Permission permission)
Determines if the specified permissions implies the permissions expressed inpermission
.- Specified by:
implies
in classjava.security.PermissionCollection
- Parameters:
permission
- The Permission object to compare with thisPackagePermission
object.- Returns:
true
ifpermission
is a proper subset of a permission in the set;false
otherwise.
-
elements
public java.util.Enumeration elements()
Returns an enumeration of allPackagePermission
objects in the container.- Specified by:
elements
in classjava.security.PermissionCollection
- Returns:
- Enumeration of all
PackagePermission
objects.
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-