📄 field.html
字号:
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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setChar(java.lang.Object, char)"><!-- --></A><H3>setChar</H3><PRE>public void <B>setChar</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj, char c) throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>, <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Sets the value of a field as a <code>char</code> on the specified object. This method is equivalent to <code>set(obj, cObj)</code>, where <code>cObj</code> is a <code>Character</code> object and <code>cObj.charValue() == c</code>.<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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setShort(java.lang.Object, short)"><!-- --></A><H3>setShort</H3><PRE>public void <B>setShort</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj, short s) throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>, <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Sets the value of a field as a <code>short</code> on the specified object. This method is equivalent to <code>set(obj, sObj)</code>, where <code>sObj</code> is a <code>Short</code> object and <code>sObj.shortValue() == s</code>.<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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setInt(java.lang.Object, int)"><!-- --></A><H3>setInt</H3><PRE>public void <B>setInt</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj, int i) throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>, <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Sets the value of a field as an <code>int</code> on the specified object. This method is equivalent to <code>set(obj, iObj)</code>, where <code>iObj</code> is a <code>Integer</code> object and <code>iObj.intValue() == i</code>.<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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setLong(java.lang.Object, long)"><!-- --></A><H3>setLong</H3><PRE>public void <B>setLong</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj, long l) throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>, <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Sets the value of a field as a <code>long</code> on the specified object. This method is equivalent to <code>set(obj, lObj)</code>, where <code>lObj</code> is a <code>Long</code> object and <code>lObj.longValue() == l</code>.<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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setFloat(java.lang.Object, float)"><!-- --></A><H3>setFloat</H3><PRE>public void <B>setFloat</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj, float f) throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>, <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Sets the value of a field as a <code>float</code> on the specified object. This method is equivalent to <code>set(obj, fObj)</code>, where <code>fObj</code> is a <code>Float</code> object and <code>fObj.floatValue() == f</code>.<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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setDouble(java.lang.Object, double)"><!-- --></A><H3>setDouble</H3><PRE>public void <B>setDouble</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj, double d) throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>, <A HREF="../../../java/lang/IllegalAccessException.html">IllegalAccessException</A></PRE><DL><DD>Sets the value of a field as a <code>double</code> on the specified object. This method is equivalent to <code>set(obj, dObj)</code>, where <code>dObj</code> is a <code>Double</code> object and <code>dObj.doubleValue() == d</code>.<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 an unwrapping conversion fails.<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#set(java.lang.Object, java.lang.Object)"><CODE>set(java.lang.Object, java.lang.Object)</CODE></A></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Field.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/lang/reflect/Constructor.html"><B>PREV CLASS</B></A> <A HREF="../../../java/lang/reflect/Method.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> <A HREF="Field.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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 + -