Methods Summary |
---|
public boolean | equals(java.lang.Object o)Checks two EJBRoleRefPermission objects for equality.
EJBRoleRefPermission objects are equivalent if they have case
equivalent name and actions values.
Two Permission objects, P1 and P2, are equivalent if and only if
P1.implies(P2) && P2.implies(P1).
if (o == null ||
! (o instanceof EJBRoleRefPermission)) return false;
EJBRoleRefPermission that = (EJBRoleRefPermission) o;
if (!this.getName().equals(that.getName())) return false;
return this.actions.equals(that.actions);
|
public java.lang.String | getActions()Returns a canonical String representation of the actions of this
EJBRoleRefPermission.
return this.actions;
|
public int | hashCode()Returns the hash code value for this EJBRoleRefPermission. The properties
of the returned hash code must be as follows:
- During the lifetime of a Java application, the hashCode method
must return the same integer value, every time it is called on a
EJBRoleRefPermission object. The value returned by hashCode for a
particular EJBRoleRefPermission need not remain consistent from
one execution of an application to another.
- If two EJBRoleRefPermission objects are equal according to the
equals method, then calling the hashCode method on each of the two
Permission objects must produce the same integer result (within an
application).
if (hashCodeValue == 0) {
String hashInput = new String(this.getName() + " " + this.actions);
hashCodeValue = hashInput.hashCode();
}
return this.hashCodeValue;
|
public boolean | implies(java.security.Permission permission)Determines if the argument Permission is "implied by" this
EJBRoleRefPermission. For this to be the case,
The argument must be an instanceof EJBRoleRefPermission
with name equivalent to that of this EJBRoleRefPermission, and
with the role reference equivalent to that of this
EJBRoleRefPermission applies.
The name and actions comparisons described above are case sensitive.
return this.equals(permission);
|
private synchronized void | readObject(java.io.ObjectInputStream s)readObject reads the serialized fields from the
input stream and uses them to restore the permission.
This method need not be implemented if establishing the
values of the serialized fields (as is done by defaultReadObject)
is sufficient to initialize the permission.
s.defaultReadObject();
|
private synchronized void | writeObject(java.io.ObjectOutputStream s)writeObject is used to establish the values of the serialized fields
before they are written to the output stream and need not be
implemented if the values of the serialized fields are always
available and up to date. The serialized fields are written to
the output stream in the same form as they would be written
by defaultWriteObject.
s.defaultWriteObject();
|