Package org.wildfly.security.permission
Class AbstractBooleanPermission<This extends AbstractBooleanPermission<This>>
- java.lang.Object
-
- java.security.Permission
-
- org.wildfly.security.permission.AbstractPermission<This>
-
- org.wildfly.security.permission.AbstractBooleanPermission<This>
-
- All Implemented Interfaces:
Serializable
,Guard
,PermissionVerifier
- Direct Known Subclasses:
LoginPermission
public abstract class AbstractBooleanPermission<This extends AbstractBooleanPermission<This>> extends AbstractPermission<This>
A base class for nameless and actionless permissions that are either granted or not granted.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.wildfly.security.permission.PermissionVerifier
ALL, NONE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBooleanPermission()
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(This other)
Determine whether this permission object is equal to another object of this permission type.int
hashCode()
Get the hash code of this permission.boolean
implies(This permission)
Determine whether this permission implies another permission.AbstractPermissionCollection
newPermissionCollection()
Get an empty permission collection which is capable of holding instances of this permission type.-
Methods inherited from class org.wildfly.security.permission.AbstractPermission
equals, getActions, implies, requireEmptyActions, writeReplace
-
Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.permission.PermissionVerifier
and, checkPermission, not, or, toPermissionCollection, unless, xor
-
-
-
-
Method Detail
-
implies
public boolean implies(This permission)
Description copied from class:AbstractPermission
Determine whether this permission implies another permission.- Specified by:
implies
in classAbstractPermission<This extends AbstractBooleanPermission<This>>
- Parameters:
permission
- the other permission- Returns:
true
if this permission implies the other;false
otherwise
-
equals
public boolean equals(This other)
Description copied from class:AbstractPermission
Determine whether this permission object is equal to another object of this permission type.- Specified by:
equals
in classAbstractPermission<This extends AbstractBooleanPermission<This>>
- Parameters:
other
- the permission to compare to- Returns:
true
if the object is a permission equal to this one;false
otherwise
-
hashCode
public int hashCode()
Description copied from class:AbstractPermission
Get the hash code of this permission. The result must be consistent with the definedAbstractPermission.equals(AbstractPermission)
result.- Specified by:
hashCode
in classAbstractPermission<This extends AbstractBooleanPermission<This>>
- Returns:
- the hash code of this permission
-
newPermissionCollection
public AbstractPermissionCollection newPermissionCollection()
Description copied from class:AbstractPermission
Get an empty permission collection which is capable of holding instances of this permission type.The default implementation returns a
SimplePermissionCollection
.- Overrides:
newPermissionCollection
in classAbstractPermission<This extends AbstractBooleanPermission<This>>
- Returns:
- the permission collection to use
-
-