throwable.html

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

HTML
1,127
字号
<TD><CODE><B><A HREF="../instrument/IllegalClassFormatException.html" title="java.lang.instrument 中的类">IllegalClassFormatException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当其输入参数无效时,由 <A HREF="../instrument/ClassFileTransformer.html#transform(java.lang.ClassLoader, java.lang.String, java.lang.Class, java.security.ProtectionDomain, byte[])"><CODE>ClassFileTransformer.transform</CODE></A> 的实现抛出该异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../instrument/UnmodifiableClassException.html" title="java.lang.instrument 中的类">UnmodifiableClassException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在无法修改指定类之一时,由 <A HREF="../instrument/Instrumentation.html#redefineClasses(java.lang.instrument.ClassDefinition[])"><CODE>Instrumentation.redefineClasses</CODE></A> 的实现抛出此异常。</TD></TR></TABLE>&nbsp;<P><A NAME="java.lang.reflect"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><A HREF="../reflect/package-summary.html">java.lang.reflect</A> 中 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的使用</FONT></TH></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2"><A HREF="../reflect/package-summary.html">java.lang.reflect</A> 中 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的子类</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../reflect/GenericSignatureFormatError.html" title="java.lang.reflect 中的类">GenericSignatureFormatError</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当需要解释类型、方法或构造方法的一般签名信息的反射方法遇到语法错误的签名属性时,抛出该错误。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../reflect/InvocationTargetException.html" title="java.lang.reflect 中的类">InvocationTargetException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InvocationTargetException 是一种包装由调用方法或构造方法所抛出异常的经过检查的异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../reflect/MalformedParameterizedTypeException.html" title="java.lang.reflect 中的类">MalformedParameterizedTypeException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当反射方法遇到语义错误的参数化类型,而反射方法需要实例化该类型时,抛出该异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../reflect/UndeclaredThrowableException.html" title="java.lang.reflect 中的类">UndeclaredThrowableException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果代理实例的调用处理程序的 <A HREF="../reflect/InvocationHandler.html#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])"><CODE>invoke</CODE></A> 方法抛出一个经过检查的异常(不可分配给 <code>RuntimeException</code> 或 <code>Error</code> 的 <code>Throwable</code>),且该异常不可分配给该方法(在代理实例上调用该方法,并将其指派到调用处理程序)的 <code>throws</code> 子句中声明的任何异常类,则由代理实例上的方法调用抛出此异常。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">返回 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的 <A HREF="../reflect/package-summary.html">java.lang.reflect</A> 中的方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A></CODE></FONT></TD><TD><CODE><B>InvocationTargetException.</B><B><A HREF="../reflect/InvocationTargetException.html#getCause()">getCause</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此异常的原因(抛出的目标异常,可能为 <tt>null</tt>)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A></CODE></FONT></TD><TD><CODE><B>UndeclaredThrowableException.</B><B><A HREF="../reflect/UndeclaredThrowableException.html#getCause()">getCause</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此异常的原因(此 <code>UndeclaredThrowableException</code> 中包装的 <code>Throwable</code> 实例,可能为 <tt>null</tt>)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A></CODE></FONT></TD><TD><CODE><B>InvocationTargetException.</B><B><A HREF="../reflect/InvocationTargetException.html#getTargetException()">getTargetException</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;获得抛出的目标异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A></CODE></FONT></TD><TD><CODE><B>UndeclaredThrowableException.</B><B><A HREF="../reflect/UndeclaredThrowableException.html#getUndeclaredThrowable()">getUndeclaredThrowable</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此 <code>UndeclaredThrowableException</code> 中包装的 <code>Throwable</code> 实例,它可能为 <tt>null</tt>。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">抛出 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的 <A HREF="../reflect/package-summary.html">java.lang.reflect</A> 中的方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Object.html" title="java.lang 中的类">Object</A></CODE></FONT></TD><TD><CODE><B>InvocationHandler.</B><B><A HREF="../reflect/InvocationHandler.html#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])">invoke</A></B>(<A HREF="../Object.html" title="java.lang 中的类">Object</A>&nbsp;proxy,       <A HREF="../reflect/Method.html" title="java.lang.reflect 中的类">Method</A>&nbsp;method,       <A HREF="../Object.html" title="java.lang 中的类">Object</A>[]&nbsp;args)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在代理实例上处理方法调用并返回结果。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">参数类型为 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的 <A HREF="../reflect/package-summary.html">java.lang.reflect</A> 中的构造方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../reflect/InvocationTargetException.html#InvocationTargetException(java.lang.Throwable)">InvocationTargetException</A></B>(<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造带目标异常的 InvocationTargetException。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../reflect/InvocationTargetException.html#InvocationTargetException(java.lang.Throwable, java.lang.String)">InvocationTargetException</A></B>(<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;target,                          <A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造带目标异常和详细消息的 InvocationTargetException。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../reflect/UndeclaredThrowableException.html#UndeclaredThrowableException(java.lang.Throwable)">UndeclaredThrowableException</A></B>(<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;undeclaredThrowable)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;根据指定的 <code>Throwable</code> 构造一个 <code>UndeclaredThrowableException</code>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../reflect/UndeclaredThrowableException.html#UndeclaredThrowableException(java.lang.Throwable, java.lang.String)">UndeclaredThrowableException</A></B>(<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;undeclaredThrowable,                             <A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;根据指定的 <code>Throwable</code> 和详细消息构造 <code>UndeclaredThrowableException</code>。</TD></TR></TABLE>&nbsp;<P><A NAME="java.util"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><A HREF="../../util/package-summary.html">java.util</A> 中 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的使用</FONT></TH></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2"><A HREF="../../util/package-summary.html">java.util</A> 中 <A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A> 的子类</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/ConcurrentModificationException.html" title="java.util 中的类">ConcurrentModificationException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当方法检测到对象的并发修改,但不允许这种修改时,抛出此异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/DuplicateFormatFlagsException.html" title="java.util 中的类">DuplicateFormatFlagsException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格式说明符中提供重复标志时抛出的未经检查的异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/EmptyStackException.html" title="java.util 中的类">EmptyStackException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该异常由 <code>Stack</code> 类中的方法抛出,以表明堆栈为空。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/FormatFlagsConversionMismatchException.html" title="java.util 中的类">FormatFlagsConversionMismatchException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;转换与标志不兼容时抛出未经检查的异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/FormatterClosedException.html" title="java.util 中的类">FormatterClosedException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格式化程序已关闭时抛出的未经检查的异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/IllegalFormatCodePointException.html" title="java.util 中的类">IllegalFormatCodePointException</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将具有 <A HREF="../Character.html#isValidCodePoint(int)"><CODE>Character.isValidCodePoint(int)</CODE></A> 所定义的无效 Unicode 代码点的字符传递给 <A HREF="../../util/Formatter.html" title="java.util 中的类"><CODE>Formatter</CODE></A> 时,抛出未经检查的异常。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../util/IllegalFormatConversionException.html" title="java.util 中的类">IllegalFormatConversionException</

⌨️ 快捷键说明

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