class.html
来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 1,219 行 · 第 1/5 页
HTML
1,219 行
<BR> 返回表示数组组件类型的 <code>Class</code>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Constructor.html" title="java.lang.reflect 中的类">Constructor</A><<A HREF="Class.html" title="Class 中的类型参数">T</A>></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getConstructor(java.lang.Class...)">getConstructor</A></B>(<A HREF="Class.html" title="java.lang 中的类">Class</A>... parameterTypes)</CODE><BR> 返回一个 <code>Constructor</code> 对象,它反映此 <code>Class</code> 对象所表示的类的指定公共构造方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Constructor.html" title="java.lang.reflect 中的类">Constructor</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getConstructors()">getConstructors</A></B>()</CODE><BR> 返回一个包含某些 <code>Constructor</code> 对象的数组,这些对象反映此 <code>Class</code> 对象所表示的类的所有公共构造方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="annotation/Annotation.html" title="java.lang.annotation 中的接口">Annotation</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredAnnotations()">getDeclaredAnnotations</A></B>()</CODE><BR> 返回直接存在于此元素上的所有注释。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Class.html" title="java.lang 中的类">Class</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredClasses()">getDeclaredClasses</A></B>()</CODE><BR> 返回 <code>Class</code> 对象的一个数组,这些对象反映声明为此 <code>Class</code> 对象所表示的类的成员的所有类和接口,包括该类所声明的公共、保护、默认(包)访问及私有类和接口,但不包括继承的类和接口。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Constructor.html" title="java.lang.reflect 中的类">Constructor</A><<A HREF="Class.html" title="Class 中的类型参数">T</A>></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredConstructor(java.lang.Class...)">getDeclaredConstructor</A></B>(<A HREF="Class.html" title="java.lang 中的类">Class</A>... parameterTypes)</CODE><BR> 返回一个 <code>Constructor</code> 对象,该对象反映此 <code>Class</code> 对象所表示的类或接口的指定构造方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Constructor.html" title="java.lang.reflect 中的类">Constructor</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredConstructors()">getDeclaredConstructors</A></B>()</CODE><BR> 返回 <code>Constructor</code> 对象的一个数组,这些对象反映此 <code>Class</code> 对象表示的类声明的所有构造方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Field.html" title="java.lang.reflect 中的类">Field</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredField(java.lang.String)">getDeclaredField</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> name)</CODE><BR> 返回一个 <code>Field</code> 对象,该对象反映此 <code>Class</code> 对象所表示的类或接口的指定已声明字段。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Field.html" title="java.lang.reflect 中的类">Field</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredFields()">getDeclaredFields</A></B>()</CODE><BR> 返回 <code>Field</code> 对象的一个数组,这些对象反映此 <code>Class</code> 对象所表示的类或接口所声明的所有字段,包括公共、保护、默认(包)访问和私有字段,但不包括继承的字段。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Method.html" title="java.lang.reflect 中的类">Method</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredMethod(java.lang.String, java.lang.Class...)">getDeclaredMethod</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> name, <A HREF="Class.html" title="java.lang 中的类">Class</A>... parameterTypes)</CODE><BR> 返回一个 <code>Method</code> 对象,该对象反映此 <code>Class</code> 对象所表示的类或接口的指定已声明方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Method.html" title="java.lang.reflect 中的类">Method</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaredMethods()">getDeclaredMethods</A></B>()</CODE><BR> 返回 <code>Method</code> 对象的一个数组,这些对象反映此 <code>Class</code> 对象表示的类或接口声明的所有方法,包括公共、保护、默认(包)访问和私有方法,但不包括继承的方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Class.html" title="java.lang 中的类">Class</A><?></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getDeclaringClass()">getDeclaringClass</A></B>()</CODE><BR> 如果此 <code>Class</code> 对象所表示的类或接口是另一个类的成员,则返回的 <code>Class</code> 对象表示该对象的声明类。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Class.html" title="java.lang 中的类">Class</A><?></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getEnclosingClass()">getEnclosingClass</A></B>()</CODE><BR> 返回基础类的立即封闭类。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Constructor.html" title="java.lang.reflect 中的类">Constructor</A><?></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getEnclosingConstructor()">getEnclosingConstructor</A></B>()</CODE><BR> 如果该 <tt>Class</tt> 对象表示构造方法中的一个本地或匿名类,则返回 <A HREF="reflect/Constructor.html" title="java.lang.reflect 中的类"><CODE>Constructor</CODE></A> 对象,它表示基础类的立即封闭构造方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Method.html" title="java.lang.reflect 中的类">Method</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getEnclosingMethod()">getEnclosingMethod</A></B>()</CODE><BR> 如果此 <tt>Class</tt> 对象表示某一方法中的一个本地或匿名类,则返回 <A HREF="reflect/Method.html" title="java.lang.reflect 中的类"><CODE>Method</CODE></A> 对象,它表示基础类的立即封闭方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Class.html" title="Class 中的类型参数">T</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getEnumConstants()">getEnumConstants</A></B>()</CODE><BR> 如果此 Class 对象不表示枚举类型,则返回枚举类的元素或 null。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Field.html" title="java.lang.reflect 中的类">Field</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getField(java.lang.String)">getField</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> name)</CODE><BR> 返回一个 <code>Field</code> 对象,它反映此 <code>Class</code> 对象所表示的类或接口的指定公共成员字段。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Field.html" title="java.lang.reflect 中的类">Field</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getFields()">getFields</A></B>()</CODE><BR> 返回一个包含某些 <code>Field</code> 对象的数组,这些对象反映此 <code>Class</code> 对象所表示的类或接口的所有可访问公共字段。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Type.html" title="java.lang.reflect 中的接口">Type</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getGenericInterfaces()">getGenericInterfaces</A></B>()</CODE><BR> 返回表示某些接口的 <tt>Type</tt>,这些接口由此对象所表示的类或接口直接实现。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Type.html" title="java.lang.reflect 中的接口">Type</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getGenericSuperclass()">getGenericSuperclass</A></B>()</CODE><BR> 返回表示此 <tt>Class</tt> 所表示的实体(类、接口、基本类型或 void)的直接超类的 <tt>Type</tt>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Class.html" title="java.lang 中的类">Class</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getInterfaces()">getInterfaces</A></B>()</CODE><BR> 确定此对象所表示的类或接口实现的接口。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Method.html" title="java.lang.reflect 中的类">Method</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getMethod(java.lang.String, java.lang.Class...)">getMethod</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> name, <A HREF="Class.html" title="java.lang 中的类">Class</A>... parameterTypes)</CODE><BR> 返回一个 <code>Method</code> 对象,它反映此 <code>Class</code> 对象所表示的类或接口的指定公共成员方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="reflect/Method.html" title="java.lang.reflect 中的类">Method</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getMethods()">getMethods</A></B>()</CODE><BR> 返回一个包含某些 <code>Method</code> 对象的数组,这些对象反映此 <code>Class</code> 对象所表示的类或接口(包括那些由该类或接口声明的以及从超类和超接口继承的那些的类或接口)的公共 <em>member</em> 方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getModifiers()">getModifiers</A></B>()</CODE><BR> 返回此类或接口以整数编码的 Java 语言修饰符。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getName()">getName</A></B>()</CODE><BR> 以 <tt>String</tt> 的形式返回此 <tt>Class</tt> 对象所表示的实体(类、接口、数组类、基本类型或 void)名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Package.html" title="java.lang 中的类">Package</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getPackage()">getPackage</A></B>()</CODE><BR> 获取此类的包。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.security.ProtectionDomain</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getProtectionDomain()">getProtectionDomain</A></B>()</CODE><BR> 返回该类的 <code>ProtectionDomain</code>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.net.URL</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getResource(java.lang.String)">getResource</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> name)</CODE><BR> 查找带有给定名称的资源。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.InputStream</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getResourceAsStream(java.lang.String)">getResourceAsStream</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> name)</CODE><BR> 查找具有给定名称的资源。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="Object.html" title="java.lang 中的类">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getSigners()">getSigners</A></B>()</CODE><BR> 获取此类的标记。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="Class.html#getSimpleName()">getSimpleName</A></B>()</CODE><BR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?