Build 1.0_r1(from source)

java.util
Class PropertyPermission

java.lang.Object
  extended by java.security.Permission
      extended by java.security.BasicPermission
          extended by java.util.PropertyPermission
All Implemented Interfaces:
Serializable, Guard

public final class PropertyPermission
extends BasicPermission

PropertyPermission objects represent permission to access system properties.

See Also:
Serialized Form

Constructor Summary
PropertyPermission(String name, String actions)
          Constructs a new instance of this class.
 
Method Summary
 boolean equals(Object o)
          Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
 String getActions()
          Returns the actions associated with the receiver.
 int hashCode()
          Returns an integer hash code for the receiver.
 boolean implies(Permission permission)
          Indicates whether the argument permission is implied by the receiver.
 PermissionCollection newPermissionCollection()
          Returns a new PermissionCollection for holding permissions of this class.
 
Methods inherited from class java.security.Permission
checkGuard, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyPermission

public PropertyPermission(String name,
                          String actions)
Constructs a new instance of this class.

Parameters:
name - java.lang.String the (possibly wildcarded) name of the property.
actions - java.lang.String the actions which are applicable to it.
Method Detail

equals

public boolean equals(Object o)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. In this case, the receiver must be for the same property as the argument, and must have the same actions.

Overrides:
equals in class BasicPermission
Parameters:
o - the object to compare with this object
Returns:
true if the object is the same as this object false if it is different from this object
See Also:
hashCode()

getActions

public String getActions()
Returns the actions associated with the receiver. The result will be either "read", "write", or "read,write".

Overrides:
getActions in class BasicPermission
Returns:
String the actions associated with the receiver.

hashCode

public int hashCode()
Returns an integer hash code for the receiver. Any two objects which answer true when passed to equals must answer the same value for this method.

Overrides:
hashCode in class BasicPermission
Returns:
the receiver's hash
See Also:
equals(java.lang.Object)

implies

public boolean implies(Permission permission)
Indicates whether the argument permission is implied by the receiver.

Overrides:
implies in class BasicPermission
Parameters:
permission - java.security.Permission the permission to check
Returns:
boolean true if the argument permission is implied by the receiver, and false if it is not.

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a new PermissionCollection for holding permissions of this class. Answer null if any permission collection can be used.

Overrides:
newPermissionCollection in class BasicPermission
Returns:
a new PermissionCollection or null see java.security.BasicPermissionCollection
See Also:
BasicPermissionCollection

Build 1.0_r1(from source)

Please submit a feedback, bug or feature