⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 permission.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<DL><DD>Constructs a permission with the specified name.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the Permission object being created.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="checkGuard(java.lang.Object)"><!-- --></A><H3>checkGuard</H3><PRE>public void <B>checkGuard</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;object)                throws <A HREF="../../java/lang/SecurityException.html">SecurityException</A></PRE><DL><DD>Implements the guard interface for a permission. The  <code>SecurityManager.checkPermission</code> method is called,  passing this permission object as the permission to check. Returns silently if access is granted. Otherwise, throws a SecurityException.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/security/Guard.html#checkGuard(java.lang.Object)">checkGuard</A></CODE> in interface <CODE><A HREF="../../java/security/Guard.html">Guard</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>object</CODE> - the object being guarded (currently ignored).<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its         <code>checkPermission</code> method doesn't allow access.<DT><B>See Also: </B><DD><A HREF="../../java/security/Guard.html"><CODE>Guard</CODE></A>, <A HREF="../../java/security/GuardedObject.html"><CODE>GuardedObject</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A></DL></DD></DL><HR><A NAME="implies(java.security.Permission)"><!-- --></A><H3>implies</H3><PRE>public abstract boolean <B>implies</B>(<A HREF="../../java/security/Permission.html">Permission</A>&nbsp;permission)</PRE><DL><DD>Checks if the specified permission's actions are "implied by"  this object's actions. <P> This must be implemented by subclasses of Permission, as they are the  only ones that can impose semantics on a Permission object.  <p>The <code>implies</code> method is used by the AccessController to determine whether or not a requested permission is implied by another permission that is known to be valid in the current execution context.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>permission</CODE> - the permission to check against.<DT><B>Returns:</B><DD>true if the specified permission is implied by this object, false if not.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public abstract boolean <B>equals</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;obj)</PRE><DL><DD>Checks two Permission objects for equality. <P> Do not use the <code>equals</code> method for making access control decisions; use the <code>implies</code> method.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object we are testing for equality with this object.<DT><B>Returns:</B><DD>true if both Permission objects are equivalent.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public abstract int <B>hashCode</B>()</PRE><DL><DD>Returns the hash code value for this Permission object. <P> The required <code>hashCode</code> behavior for Permission Objects is the following: <p> <ul> <li>Whenever it is invoked on the same Permission object more than      once during an execution of a Java application, the      <code>hashCode</code> 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. <p> <li>If two Permission objects are equal according to the      <code>equals</code>      method, then calling the <code>hashCode</code> method on each of the     two Permission objects must produce the same integer result.  </ul><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a hash code value for this object.</DL></DD></DL><HR><A NAME="getName()"><!-- --></A><H3>getName</H3><PRE>public final <A HREF="../../java/lang/String.html">String</A> <B>getName</B>()</PRE><DL><DD>Returns the name of this Permission. For example, in the case of a <code>java.io.FilePermission</code>, the name will be a pathname.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the name of this Permission.</DL></DD></DL><HR><A NAME="getActions()"><!-- --></A><H3>getActions</H3><PRE>public abstract <A HREF="../../java/lang/String.html">String</A> <B>getActions</B>()</PRE><DL><DD>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:  <pre>   perm1 = new FilePermission(p1,"read,write");   perm2 = new FilePermission(p2,"write,read");  </pre>  both return  "read,write" when the <code>getActions</code> method is invoked.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the actions of this Permission.</DL></DD></DL><HR><A NAME="newPermissionCollection()"><!-- --></A><H3>newPermissionCollection</H3><PRE>public <A HREF="../../java/security/PermissionCollection.html">PermissionCollection</A> <B>newPermissionCollection</B>()</PRE><DL><DD>Returns an empty PermissionCollection for a given Permission object, or null if one is not defined. Subclasses of class Permission should  override this if they need to store their permissions in a particular PermissionCollection object in order to provide the correct semantics when the <code>PermissionCollection.implies</code> method is called.  If null is returned, then the caller of this method is free to store permissions of this type in any PermissionCollection they choose (one that uses a Hashtable, one that uses a Vector, etc).<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a new PermissionCollection object for this type of Permission, or  null if one is not defined.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string describing this Permission.  The convention is to specify the class name, the permission name, and the actions in the following format: '("ClassName" "name" "actions")'.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>information about this Permission.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Permission.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/security/MessageDigestSpi.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/security/PermissionCollection.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Permission.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -