CodeAccessPermission.isSubsetOf Method
Determines whether a current permission is a subset of the specified permission when it is overridden by a derived class.
Syntax
public abstract boolean isSubsetOf(CodeAccessPermission target)
Run On
Called
Parameters
- target
Type: CodeAccessPermission Class
A CodeAccessPermission class object.
Return Value
Type: boolean
true if a current permission is a subset of a specified permission; otherwise, false.
Remarks
You can override the method as part of the process of making an API more secure.
Examples
The following example shows how to override the isSubsetOf method to determine whether permissions that are stored in the current object are located in _target.
public boolean isSubsetOf(CodeAccessPermission _target)
{
SysTestCodeAccessPermission sysTarget = _target;
return this.handle() == _target.handle();
}