public final class

ExecOptionPermission

extends Permission
java.lang.Object
   ↳ java.security.Permission
     ↳ com.sun.rmi.rmid.ExecOptionPermission

Class Overview

The ExecOptionPermission class represents permission for rmid to use a specific command-line option when launching an activation group.

Summary

Public Constructors
ExecOptionPermission(String name)
ExecOptionPermission(String name, String actions)
Public Methods
boolean equals(Object obj)
Checks two ExecOptionPermission objects for equality.
String getActions()
Returns the canonical string representation of the actions.
int hashCode()
Returns the hash code value for this object.
boolean implies(Permission p)
Checks if the specified permission is "implied" by this object.
PermissionCollection newPermissionCollection()
Returns a new PermissionCollection object for storing ExecOptionPermission objects.
[Expand]
Inherited Methods
From class java.security.Permission
From class java.lang.Object
From interface java.security.Guard

Public Constructors

public ExecOptionPermission (String name)

public ExecOptionPermission (String name, String actions)

Public Methods

public boolean equals (Object obj)

Checks two ExecOptionPermission objects for equality. Checks that obj's class is the same as this object's class and has the same name as this object.

Parameters
obj the object we are testing for equality with this object.
Returns
  • true if obj is an ExecOptionPermission, and has the same name as this ExecOptionPermission object, false otherwise.

public String getActions ()

Returns the canonical string representation of the actions.

Returns
  • the canonical string representation of the actions.

public int hashCode ()

Returns the hash code value for this object. The hash code used is the hash code of the name, that is, getName().hashCode(), where getName is from the Permission superclass.

Returns
  • a hash code value for this object.

public boolean implies (Permission p)

Checks if the specified permission is "implied" by this object.

More specifically, this method returns true if:

  • p's class is the same as this object's class, and

  • p's name equals or (in the case of wildcards) is implied by this object's name. For example, "a.b.*" implies "a.b.c", and "a.b=*" implies "a.b=c"

Parameters
p the permission to check against.
Returns
  • true if the passed permission is equal to or implied by this permission, false otherwise.

public PermissionCollection newPermissionCollection ()

Returns a new PermissionCollection object for storing ExecOptionPermission objects.

A ExecOptionPermissionCollection stores a collection of ExecOptionPermission permissions.

ExecOptionPermission objects must be stored in a manner that allows them to be inserted in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.

Returns
  • a new PermissionCollection object suitable for storing ExecOptionPermissions.