Top Fields Constructors Methods
org.jboss.modules.security

pack-priv final Class UninitializedPermission

extends Permission
Class Inheritance
Imports
java.security.Permission

Field Summary

Modifier and TypeField and Description
pack-priv static final UninitializedPermission
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the object we are testing for equality with this object.
obj
)

Implements abstract java.security.Permission.equals.

Checks two Permission objects for equality.
public String
getActions()

Implements abstract java.security.Permission.getActions.

Returns the actions as a String.
public int
hashCode()

Implements abstract java.security.Permission.hashCode.

Returns the hash code value for this Permission object.
public boolean
implies(final Permission
the permission to check against.
permission
)

Implements abstract java.security.Permission.implies.

Checks if the specified permission's actions are "implied by" this object's actions.
Inherited from java.security.Permission:
checkGuardgetNamenewPermissionCollectiontoString

Field Detail

INSTANCEback to summary
pack-priv static final UninitializedPermission INSTANCE
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.Permission.serialVersionUID.

Constructor Detail

UninitializedPermissionback to summary
private UninitializedPermission()

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Implements abstract java.security.Permission.equals.

Doc from java.security.Permission.equals.

Checks two Permission objects for equality.

Do not use the equals method for making access control decisions; use the implies method.

Parameters
obj:Object

the object we are testing for equality with this object.

Returns:boolean

true if both Permission objects are equivalent.

getActionsback to summary
public String getActions()

Implements abstract java.security.Permission.getActions.

Doc from java.security.Permission.getActions.

Returns the actions as a String. This is abstract so subclasses can defer creating a String representation until one is needed. Subclasses should always return actions in what they consider to be their canonical form. For example, two FilePermission objects created via the following:

  perm1 = new FilePermission(p1,"read,write");
  perm2 = new FilePermission(p2,"write,read");
both return "read,write" when the getActions method is invoked.
Returns:String

the actions of this Permission.

hashCodeback to summary
public int hashCode()

Implements abstract java.security.Permission.hashCode.

Doc from java.security.Permission.hashCode.

Returns the hash code value for this Permission object.

The required hashCode behavior for Permission Objects is the following:

  • Whenever it is invoked on the same Permission object more than once during an execution of a Java application, the hashCode method must consistently return the same integer. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two Permission 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.
Returns:int

a hash code value for this object.

impliesback to summary
public boolean implies(final Permission permission)

Implements abstract java.security.Permission.implies.

Doc from java.security.Permission.implies.

Checks if the specified permission's actions are "implied by" this object's actions.

This must be implemented by subclasses of Permission, as they are the only ones that can impose semantics on a Permission object.

The implies method is used by the AccessController to determine whether a requested permission is implied by another permission that is known to be valid in the current execution context.

Parameters
permission:Permission

the permission to check against.

Returns:boolean

true if the specified permission is implied by this object, false if not.