Package ej.microui.display
Class FontPermission
- java.lang.Object
-
- java.security.Permission
-
- ej.microui.display.FontPermission
-
- All Implemented Interfaces:
Serializable,Guard
public class FontPermission extends Permission
This class is for font permissions.The name is related to the font APIs and it symbolizes the permission's action.
The meaning of the possible permissions is defined as follows:
- add
- add permission. Permission is checked when fonts are added to the system during the initialization process.
- Since:
- 2.0
- See Also:
Permission, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FontPermission(String permission)Creates a permission with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Checks two Permission objects for equality.StringgetActions()Returns the actions as a String.inthashCode()Returns the hash code value for this Permission object.booleanimplies(Permission permission)Checks if the specified permission's actions are "implied by" this object's actions.-
Methods inherited from class java.security.Permission
getName, toString
-
-
-
-
Constructor Detail
-
FontPermission
public FontPermission(String permission)
Creates a permission with the specified name.- Parameters:
permission- the name of theFontPermission.
-
-
Method Detail
-
equals
public boolean equals(@Nullable Object obj)
Description copied from class:PermissionChecks two Permission objects for equality.Do not use the
equalsmethod for making access control decisions; use theimpliesmethod.- Specified by:
equalsin classPermission- Parameters:
obj- the object we are testing for equality with this object.- Returns:
- true if both Permission objects are equivalent.
- See Also:
Object.hashCode(),HashMap
-
getActions
public String getActions()
Description copied from class:PermissionReturns 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 thegetActionsmethod is invoked.- Specified by:
getActionsin classPermission- Returns:
- the actions of this Permission.
-
hashCode
public int hashCode()
Description copied from class:PermissionReturns the hash code value for this Permission object.The required
hashCodebehavior 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
hashCodemethod 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
equalsmethod, then calling thehashCodemethod on each of the two Permission objects must produce the same integer result.
- Specified by:
hashCodein classPermission- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
- Whenever it is invoked on the same Permission object more than once during an execution of a
Java application, the
-
implies
public boolean implies(Permission permission)
Description copied from class:PermissionChecks 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.
- Specified by:
impliesin classPermission- Parameters:
permission- the permission to check against.- Returns:
- true if the specified permission is implied by this object, false if not.
-
-