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

📄 field.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns a hashcode for this <code>Field</code>.  This is computed as the exclusive-or of the hashcodes for the underlying field's declaring class name and its 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>Following copied from class: <CODE>java.lang.Object</CODE></DD><DD><DL><DT><B>Returns:</B><DD>a hash code value for this object.<DT><B>See Also: </B><DD><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)"><CODE>Object.equals(java.lang.Object)</CODE></A>, <A HREF="../../../java/util/Hashtable.html"><CODE>Hashtable</CODE></A></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 <code>Field</code>.  The format is the access modifiers for the field, if any, followed by the field type, followed by a space, followed by the fully-qualified name of the class declaring the field, followed by a period, followed by the name of the field. For example: <pre>    public static final int java.lang.Thread.MIN_PRIORITY    private int java.io.FileDescriptor.fd </pre> <p>The modifiers are placed in canonical order as specified by "The Java Language Specification".  This is <tt>public</tt>, <tt>protected</tt> or <tt>private</tt> first, and then other modifiers in the following order: <tt>static</tt>, <tt>final</tt>, <tt>transient</tt>, <tt>volatile</tt>.<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>Following copied from class: <CODE>java.lang.Object</CODE></DD><DD><DL><DT><B>Returns:</B><DD>a string representation of the object.</DL></DD></DL><HR><A NAME="get(java.lang.Object)"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>get</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)           throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>,                  <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Returns the value of the field represented by this <code>Field</code>, on the specified object. The value is automatically wrapped in an object if it has a primitive type. <p>The underlying field's value is obtained as follows: <p>If the underlying field is a static field, the <code>obj</code> argument is ignored; it may be null. <p>Otherwise, the underlying field is an instance field.  If the specified <code>obj</code> argument is null, the method throws a <code>NullPointerException.</code> If the specified object is not an instance of the class or interface declaring the underlying field, the method throws an <code>IllegalArgumentException</code>. <p>If this <code>Field</code> object enforces Java language access control, and the underlying field is inaccessible, the method throws an <code>IllegalAccessException</code>. If the underlying field is static, the class that declared the field is initialized if it has not already been initialized.  <p>Otherwise, the value is retrieved from the underlying instance or static field.  If the field has a primitive type, the value is wrapped in an object before being returned, otherwise it is returned as is. <p>If the field is hidden in the type of <code>obj</code>, the field's value is obtained according to the preceding rules.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></CODE> - if the underlying constructor              is inaccessible.<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the specified object is not an              instance of the class or interface declaring the underlying              field (or a subclass or implementor thereof).<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified object is null              and the field is an instance field.<DD><CODE><A HREF="../../../java/lang/ExceptionInInitializerError.html">ExceptionInInitializerError</A></CODE> - if the initialization provoked              by this method fails.</DL></DD></DL><HR><A NAME="getBoolean(java.lang.Object)"><!-- --></A><H3>getBoolean</H3><PRE>public boolean <B>getBoolean</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)                   throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>,                          <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Gets the value of a field as a <code>boolean</code> on the specified object. This method is equivalent to <code>((Boolean)get(obj)).booleanValue()</code>, except that an <code>IllegalArgumentException</code> is thrown  if the field value cannot be converted to the type <code>boolean</code> by a widening conversion.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></CODE> - if the underlying constructor              is inaccessible.<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the specified object is not               an instance of the class or interface declaring the              underlying field (or a subclass or implementor               thereof), or if the field value cannot be              converted to the type <code>boolean</code> by a               widening conversion.<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified object is null              and the field is an instance field.<DD><CODE><A HREF="../../../java/lang/ExceptionInInitializerError.html">ExceptionInInitializerError</A></CODE> - if the initialization provoked              by this method fails.<DT><B>See Also: </B><DD><A HREF="../../../java/lang/reflect/Field.html#get(java.lang.Object)"><CODE>get(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getByte(java.lang.Object)"><!-- --></A><H3>getByte</H3><PRE>public byte <B>getByte</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)             throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>,                    <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Gets the value of a field as a <code>byte</code> on the specified object. This method is equivalent to <code>((Number)get(obj)).byteValue()</code>, except that an <code>IllegalArgumentException</code> is thrown  if the field value cannot be converted to the type <code>byte</code> by a widening conversion.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></CODE> - if the underlying constructor              is inaccessible.<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the specified object is not               an instance of the class or interface declaring the              underlying field (or a subclass or implementor               thereof), or if the field value cannot be              converted to the type <code>byte</code> by a               widening conversion.<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified object is null              and the field is an instance field.<DD><CODE><A HREF="../../../java/lang/ExceptionInInitializerError.html">ExceptionInInitializerError</A></CODE> - if the initialization provoked              by this method fails.<DT><B>See Also: </B><DD><A HREF="../../../java/lang/reflect/Field.html#get(java.lang.Object)"><CODE>get(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getChar(java.lang.Object)"><!-- --></A><H3>getChar</H3><PRE>public char <B>getChar</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)             throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>,                    <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Gets the value of a field as a <code>char</code> on the specified object. This method is equivalent to <code>((Character)get(obj)).charValue()</code>, except that an <code>IllegalArgumentException</code> is thrown  if the field value cannot be converted to the type <code>char</code> by a widening conversion.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></CODE> - if the underlying constructor              is inaccessible.<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the specified object is not               an instance of the class or interface declaring the              underlying field (or a subclass or implementor               thereof), or if the field value cannot be              converted to the type <code>char</code> by a               widening conversion.<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified object is null              and the field is an instance field.<DD><CODE><A HREF="../../../java/lang/ExceptionInInitializerError.html">ExceptionInInitializerError</A></CODE> - if the initialization provoked              by this method fails.<DT><B>See Also: </B><DD><A HREF="../../../java/lang/reflect/Field.html#get(java.lang.Object)"><CODE>get(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getShort(java.lang.Object)"><!-- --></A><H3>getShort</H3><PRE>public short <B>getShort</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;obj)               throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>,                      <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Gets the value of a field as a <code>short</code> on the specified object. This method is equivalent to <code>((Number)get(obj)).shortValue()</code>, except that an <code>IllegalArgumentException</code> is thrown  if the field value cannot be converted to the type <code>short</code> by a widening conversion.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></CODE> - if the underlying constructor              is inaccessible.<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the specified object is not               an instance of the class or interface declaring the              underlying field (or a subclass or implementor               thereof), or if the field value cannot be              converted to the type <code>short</code> by a               widening conversion.<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified object is null              and the field is an instance field.<DD><CODE><A HREF="../../../java/lang/ExceptionInInitializerError.html">ExceptionInInitializerError</A></CODE> - if the initialization provoked              by this method fails.<DT><B>See Also: </B><DD><A HREF="../../../java/lang/reflect/Field.html#get(java.lang.Object)"><CODE>get(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getInt(java.lang.Object)"><!-- --></A><H3>getInt</H3><PRE>

⌨️ 快捷键说明

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