package.html

来自「API資料大全」· HTML 代码 · 共 529 行 · 第 1/2 页

HTML
529
字号
<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="getName()"><!-- --></A><H3>getName</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getName</B>()</PRE><DL><DD>Return the name of this package.<DD><DL><DT><B>Returns:</B><DD>The name of this package using the Java language dot notation 		for the package. i.e  java.lang</DL></DD></DL><HR><A NAME="getSpecificationTitle()"><!-- --></A><H3>getSpecificationTitle</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getSpecificationTitle</B>()</PRE><DL><DD>Return the title of the specification that this package implements.<DD><DL><DT><B>Returns:</B><DD>the specification title, null is returned if it is not known.</DL></DD></DL><HR><A NAME="getSpecificationVersion()"><!-- --></A><H3>getSpecificationVersion</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getSpecificationVersion</B>()</PRE><DL><DD>Returns the version number of the specification that this package implements. This version string must be a sequence of positive decimal integers separated by "."'s and may have leading zeros. When version strings are compared the most significant numbers are compared.<DD><DL><DT><B>Returns:</B><DD>the specification version, null is returned if it is not known.</DL></DD></DL><HR><A NAME="getSpecificationVendor()"><!-- --></A><H3>getSpecificationVendor</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getSpecificationVendor</B>()</PRE><DL><DD>Return the name of the organization, vendor,  or company that owns and maintains the specification  of the classes that implement this package.<DD><DL><DT><B>Returns:</B><DD>the specification vendor, null is returned if it is not known.</DL></DD></DL><HR><A NAME="getImplementationTitle()"><!-- --></A><H3>getImplementationTitle</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getImplementationTitle</B>()</PRE><DL><DD>Return the title of this package.<DD><DL><DT><B>Returns:</B><DD>the title of the implementation, null is returned if it is not known.</DL></DD></DL><HR><A NAME="getImplementationVersion()"><!-- --></A><H3>getImplementationVersion</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getImplementationVersion</B>()</PRE><DL><DD>Return the version of this implementation. It consists of any string assigned by the vendor of this implementation and does not have any particular syntax specified or expected by the Java runtime. It may be compared for equality with other package version strings used for this implementation by this vendor for this package.<DD><DL><DT><B>Returns:</B><DD>the version of the implementation, null is returned if it is not known.</DL></DD></DL><HR><A NAME="getImplementationVendor()"><!-- --></A><H3>getImplementationVendor</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getImplementationVendor</B>()</PRE><DL><DD>Returns the name of the organization, vendor or company that provided this implementation.<DD><DL><DT><B>Returns:</B><DD>the vendor that implemented this package..</DL></DD></DL><HR><A NAME="isSealed()"><!-- --></A><H3>isSealed</H3><PRE>public boolean <B>isSealed</B>()</PRE><DL><DD>Returns true if this package is sealed.<DD><DL><DT><B>Returns:</B><DD>true if the package is sealed, false otherwise</DL></DD></DL><HR><A NAME="isSealed(java.net.URL)"><!-- --></A><H3>isSealed</H3><PRE>public boolean <B>isSealed</B>(<A HREF="../../java/net/URL.html">URL</A>&nbsp;url)</PRE><DL><DD>Returns true if this package is sealed with respect to the specified code source url.<DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - the code source url<DT><B>Returns:</B><DD>true if this package is sealed with respect to url</DL></DD></DL><HR><A NAME="isCompatibleWith(java.lang.String)"><!-- --></A><H3>isCompatibleWith</H3><PRE>public boolean <B>isCompatibleWith</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;desired)                         throws <A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></PRE><DL><DD>Compare this package's specification version with a desired version. It returns true if this packages specification version number is greater than or equal to the desired version number. <p> Version numbers are compared by sequentially comparing corresponding components of the desired and specification strings. Each component is converted as a decimal integer and the values compared. If the specification value is greater than the desired value true is returned. If the value is less false is returned. If the values are equal the period is skipped and the next pair of components is compared.<DD><DL><DT><B>Parameters:</B><DD><CODE>desired</CODE> - the version string of the desired version.<DT><B>Returns:</B><DD>true if this package's version number is greater 		than or equal to the desired version number<br><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></CODE> - if the desired or current version		is not of the correct dotted form.</DL></DD></DL><HR><A NAME="getPackage(java.lang.String)"><!-- --></A><H3>getPackage</H3><PRE>public static <A HREF="../../java/lang/Package.html">Package</A> <B>getPackage</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name)</PRE><DL><DD>Find a package by name in the callers classloader. The callers classloader is used to find the package instance corresponding to the named class. If the callers classloader is null then the set of packages loaded by the system classloader is searched to find the named package. <p> Packages have attributes for versions and specifications only if the class loader created the package instance with the appropriate attributes. Typically, those attributes are defined in the manifests that accompany the classes.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a package name, for example, java.lang.<DT><B>Returns:</B><DD>the package of the requested name. It may be null if no package 		information is available from the archive or codebase.</DL></DD></DL><HR><A NAME="getPackages()"><!-- --></A><H3>getPackages</H3><PRE>public static <A HREF="../../java/lang/Package.html">Package</A>[] <B>getPackages</B>()</PRE><DL><DD>Get all the packages currently known for the caller's class loader. Those packages correspond to classes loaded via or accessible by name to that class loader.  If the caller's class loader is the bootstrap classloader, which may be represented by  <code>null</code> in some implementations, only packages corresponding  to classes loaded by the bootstrap class loader will be returned.<DD><DL><DT><B>Returns:</B><DD>a new array of packages known to the callers classloader. An zero length array is returned if none are known.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Return the hashcode computed from the package name.<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>the hodecode computed from the package name.</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 the string representation of this Package. Its value is the string "package " and the package name. If the package title is defined it is appended. If the package version is defined it is appended.<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>the string representation of the package.</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/Package.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/lang/Object.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/lang/Process.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="Package.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&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 + =
减小字号Ctrl + -
显示快捷键?