Package org.wildfly.security.permission
Class LongNameSetPermissionCollection
- java.lang.Object
-
- java.security.PermissionCollection
-
- org.wildfly.security.permission.AbstractPermissionCollection
-
- org.wildfly.security.permission.NameSetPermissionCollection
-
- org.wildfly.security.permission.LongNameSetPermissionCollection
-
- All Implemented Interfaces:
Serializable
,Iterable<Permission>
,PermissionVerifier
final class LongNameSetPermissionCollection extends NameSetPermissionCollection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
LongNameSetPermissionCollection.Iter
-
Field Summary
Fields Modifier and Type Field Description private AtomicLong
bitSet
-
Fields inherited from interface org.wildfly.security.permission.PermissionVerifier
ALL, NONE
-
-
Constructor Summary
Constructors Constructor Description LongNameSetPermissionCollection(AbstractPermission<?> sourcePermission, StringEnumeration nameEnumeration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doAdd(AbstractPermission<?> permission)
Perform the work of adding a permission.EnumerationIterator<Permission>
elements()
Iterate over this permission collection.private long
getBitsForName(Permission permission)
boolean
implies(Permission permission)
Determine if the permission is verified by this object.EnumerationIterator<Permission>
iterator()
Iterate over this permission collection.private Permission
permissionFor(int id)
int
size()
Get the size of this permission collection.-
Methods inherited from class org.wildfly.security.permission.NameSetPermissionCollection
getNameEnumeration, newInstance, newInstance
-
Methods inherited from class org.wildfly.security.permission.AbstractPermissionCollection
add, getSourcePermission, writeReplace
-
Methods inherited from class java.security.PermissionCollection
elementsAsStream, 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, not, or, toPermissionCollection, unless, xor
-
-
-
-
Field Detail
-
bitSet
private final AtomicLong bitSet
-
-
Constructor Detail
-
LongNameSetPermissionCollection
LongNameSetPermissionCollection(AbstractPermission<?> sourcePermission, StringEnumeration nameEnumeration)
-
-
Method Detail
-
permissionFor
private Permission permissionFor(int id)
-
doAdd
protected void doAdd(AbstractPermission<?> permission)
Description copied from class:AbstractPermissionCollection
Perform the work of adding a permission. The permission is guaranteed to be of the correct type and the collection is guaranteed to have been writable at the time theAbstractPermissionCollection.add(Permission)
method was called.- Specified by:
doAdd
in classAbstractPermissionCollection
- Parameters:
permission
- the non-null
permission
-
implies
public boolean implies(Permission permission)
Description copied from interface:PermissionVerifier
Determine if the permission is verified by this object.- Specified by:
implies
in interfacePermissionVerifier
- Specified by:
implies
in classPermissionCollection
- Parameters:
permission
- the permission to verify (must not benull
)- Returns:
true
if the permission is implied by this verifier,false
otherwise
-
size
public int size()
Description copied from class:AbstractPermissionCollection
Get the size of this permission collection.- Specified by:
size
in classAbstractPermissionCollection
- Returns:
- the size of this permission collection
-
iterator
public EnumerationIterator<Permission> iterator()
Description copied from class:AbstractPermissionCollection
Iterate over this permission collection.- Specified by:
iterator
in interfaceIterable<Permission>
- Specified by:
iterator
in classAbstractPermissionCollection
- Returns:
- the iterator (not
null
)
-
elements
public EnumerationIterator<Permission> elements()
Description copied from class:AbstractPermissionCollection
Iterate over this permission collection.- Specified by:
elements
in classAbstractPermissionCollection
- Returns:
- the iterator (not
null
)
-
getBitsForName
private long getBitsForName(Permission permission)
-
-