annotation.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 330 行 · 第 1/2 页

HTML
330
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_03) on Wed Nov 02 09:50:10 CST 2005 --><META http-equiv="Content-Type" content="text/html; charset=gb2312"><TITLE>Annotation (Java 2 Platform SE 5.0)</TITLE><META NAME="keywords" CONTENT="java.lang.annotation.Annotation interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="Annotation (Java 2 Platform SE 5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="跳过导航链接"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Annotation.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</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>Standard&nbsp;Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;上一个类&nbsp;&nbsp;<A HREF="AnnotationFormatError.html" title="java.lang.annotation 中的类"><B>下一个类</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html@java_2Flang_2Fannotation_2FAnnotation.html" target="_top"><B>框架</B></A>  &nbsp;&nbsp;<A HREF="Annotation.html" target="_top"><B>无框架</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>所有类</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  摘要:&nbsp;嵌套&nbsp;|&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">详细信息:&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_detail">方法</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.lang.annotation</FONT><BR>接口 Annotation</H2><DL><DT><B>所有已知实现类:</B> <DD><A HREF="../Deprecated.html" title="java.lang 中的注释">Deprecated</A>, <A HREF="Documented.html" title="java.lang.annotation 中的注释">Documented</A>, <A HREF="Inherited.html" title="java.lang.annotation 中的注释">Inherited</A>, <A HREF="../Override.html" title="java.lang 中的注释">Override</A>, <A HREF="Retention.html" title="java.lang.annotation 中的注释">Retention</A>, <A HREF="../SuppressWarnings.html" title="java.lang 中的注释">SuppressWarnings</A>, <A HREF="Target.html" title="java.lang.annotation 中的注释">Target</A></DD></DL><HR><DL><DT><PRE>public interface <B>Annotation</B></DL></PRE><P>所有 annotation 类型都要扩展的公共接口。注意,手动扩展该公共接口的接口<i>不</i> 定义 annotation 类型。还要注意此接口本身不定义 annotation 类型。<P><P><DL><DT><B>从以下版本开始:</B></DT>  <DD>1.5</DD></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>方法摘要</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Class.html" title="java.lang 中的类">Class</A>&lt;? extends <A HREF="Annotation.html" title="java.lang.annotation 中的接口">Annotation</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="Annotation.html#annotationType()">annotationType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此 annotation 的注释类型。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="Annotation.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../Object.html" title="java.lang 中的类">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果指定的对象表示在逻辑上等效于此接口的注释,则返回 true。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="Annotation.html#hashCode()">hashCode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此 annotation 的哈希代码,具体说明如下:一个 annotation 的哈希代码是其成员(包括那些带有默认值的成员)的哈希代码的和,具体说明如下:annotation 成员的哈希代码是成员值哈希代码的 XOR(它是 <A HREF="../String.html#hashCode()"><CODE>String.hashCode()</CODE></A> 计算得到的成员名哈希代码的 127 倍),具体说明如下:成员值的哈希代码取决于其类型: 基值 <tt><i>v</i></tt> 的哈希代码等于 <tt><i>WrapperType</i>.valueOf(<i>v</i>).hashCode()</tt>,其中 <tt><i>WrapperType</i></tt> 是对应 <tt><i>v</i></tt> 的基本类型的包装器类型(<A HREF="../Byte.html" title="java.lang 中的类"><CODE>Byte</CODE></A>、<A HREF="../Character.html" title="java.lang 中的类"><CODE>Character</CODE></A>、<A HREF="../Double.html" title="java.lang 中的类"><CODE>Double</CODE></A>、<A HREF="../Float.html" title="java.lang 中的类"><CODE>Float</CODE></A>、<A HREF="../Integer.html" title="java.lang 中的类"><CODE>Integer</CODE></A>、<A HREF="../Long.html" title="java.lang 中的类"><CODE>Long</CODE></A>、<A HREF="../Short.html" title="java.lang 中的类"><CODE>Short</CODE></A> 或 <A HREF="../Boolean.html" title="java.lang 中的类"><CODE>Boolean</CODE></A>)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="Annotation.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此 annotation 的字符串表示形式。</TD></TR></TABLE>&nbsp;<P><!-- ============ METHOD DETAIL ========== -->

⌨️ 快捷键说明

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