public class NoPermission extends java.lang.Object implements TypePermission
If the wrapped TypePermission allows the type, this instance will throw a ForbiddenClassException
instead. An instance of this permission cannot be used to allow a type.
| Modifier and Type | Field and Description |
|---|---|
private TypePermission |
permission |
| Constructor and Description |
|---|
NoPermission(TypePermission permission)
Construct a NoPermission.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allows(java.lang.Class type)
Check permission for a provided type.
|
private final TypePermission permission
public NoPermission(TypePermission permission)
permission - the permission to negate or null to forbid any typepublic boolean allows(java.lang.Class type)
TypePermissionallows in interface TypePermissiontype - the type to checktrue if provided type is allowed, false if permission does not handle the type