Top Description Fields Constructors Methods
com.thoughtworks.xstream.security

public Class NoPermission

extends Object
implements TypePermission
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.security.TypePermission

Wrapper to negate another type permission.

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.

Author
Jörg Schaible
Since
1.4.7

Field Summary

Modifier and TypeField and Description
private final TypePermission

Constructor Summary

AccessConstructor and Description
public
NoPermission(final TypePermission
the permission to negate or null to forbid any type
permission
)

Construct a NoPermission.

Method Summary

Modifier and TypeMethod and Description
public boolean
allows(final Class<T>
the type to check
type
)

Implements com.thoughtworks.xstream.security.TypePermission.allows.

Check permission for a provided type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

permissionback to summary
private final TypePermission permission

Constructor Detail

NoPermissionback to summary
public NoPermission(final TypePermission permission)

Construct a NoPermission.

Parameters
permission:TypePermission

the permission to negate or null to forbid any type

Since
1.4.7

Method Detail

allowsback to summary
public boolean allows(final Class<T> type)

Implements com.thoughtworks.xstream.security.TypePermission.allows.

Doc from com.thoughtworks.xstream.security.TypePermission.allows.

Check permission for a provided type.

Parameters
type:Class<T>

the type to check

Returns:boolean

true if provided type is allowed, false if permission does not handle the type