Package org.wildfly.security.permission
Class NoPermissionCollection
- java.lang.Object
-
- java.security.PermissionCollection
-
- org.wildfly.security.permission.AbstractPermissionCollection
-
- org.wildfly.security.permission.NoPermissionCollection
-
- All Implemented Interfaces:
Serializable
,Iterable<Permission>
,PermissionVerifier
final class NoPermissionCollection extends AbstractPermissionCollection
The permission collection type forNoPermission
.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private static NoPermissionCollection
INSTANCE
private static long
serialVersionUID
-
Fields inherited from interface org.wildfly.security.permission.PermissionVerifier
ALL, NONE
-
-
Constructor Summary
Constructors Constructor Description NoPermissionCollection()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doAdd(AbstractPermission<?> permission)
Perform the work of adding a permission.Enumeration<Permission>
elements()
Iterate over this permission collection.boolean
equals(Object obj)
(package private) static NoPermissionCollection
getInstance()
int
hashCode()
boolean
implies(Permission permission)
Determine if the permission is verified by this object.Iterator<Permission>
iterator()
Iterate over this permission collection.(package private) Object
readResolve()
int
size()
Get the size of this permission collection.-
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, finalize, getClass, 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
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INSTANCE
private static NoPermissionCollection INSTANCE
-
-
Method Detail
-
getInstance
static NoPermissionCollection getInstance()
-
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
-
elements
public Enumeration<Permission> elements()
Description copied from class:AbstractPermissionCollection
Iterate over this permission collection.- Specified by:
elements
in classAbstractPermissionCollection
- Returns:
- the iterator (not
null
)
-
iterator
public Iterator<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
)
-
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
-
readResolve
Object readResolve()
-
-