Package org.wildfly.security.permission
Class NameSetPermissionCollection
- java.lang.Object
-
- java.security.PermissionCollection
-
- org.wildfly.security.permission.AbstractPermissionCollection
-
- org.wildfly.security.permission.NameSetPermissionCollection
-
- All Implemented Interfaces:
Serializable
,Iterable<Permission>
,PermissionVerifier
public abstract class NameSetPermissionCollection extends AbstractPermissionCollection
A permission collection for permissions with a finite set of names, which is based on a simple bit set. In this type of collection, each bit represents a unique permission of a given name. This type is not suitable for permissions with actions.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.wildfly.security.permission.PermissionVerifier
ALL, NONE
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractPermissionCollection
newInstance(AbstractNameSetOnlyPermission<?> sourcePermission)
Construct a new instance.static AbstractPermissionCollection
newInstance(AbstractPermission<?> sourcePermission, org.wildfly.security.util.StringEnumeration nameEnumeration)
Construct a new instance.-
Methods inherited from class org.wildfly.security.permission.AbstractPermissionCollection
add, doAdd, elements, iterator, size
-
Methods inherited from class java.security.PermissionCollection
elementsAsStream, implies, isReadOnly, setReadOnly, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.wildfly.security.permission.PermissionVerifier
and, checkPermission, implies, not, or, toPermissionCollection, unless, xor
-
-
-
-
Method Detail
-
newInstance
public static AbstractPermissionCollection newInstance(AbstractNameSetOnlyPermission<?> sourcePermission)
Construct a new instance. The name enumeration is pulled from the source permission object.- Parameters:
sourcePermission
- the source permission object (must not benull
)- Returns:
- the permission collection
-
newInstance
public static AbstractPermissionCollection newInstance(AbstractPermission<?> sourcePermission, org.wildfly.security.util.StringEnumeration nameEnumeration)
Construct a new instance.- Parameters:
sourcePermission
- the source permission object (must not benull
)nameEnumeration
- the name enumeration for this permission type (must not benull
)- Returns:
- the permission collection
-
-