|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind Class JAXBException
java.lang.Object java.lang.Throwable java.lang.Exception javax.xml.bind.JAXBException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- MarshalException, PropertyException, UnmarshalException, ValidationException
public class JAXBException
- extends Exception
Extends:
Throwable > Exception
这是所有 JAXB 异常的根异常类。
version |
| |
since | JAXB1.0 | |
See also | javax.xml.bind.JAXBContext, javax.xml.bind.Marshaller, javax.xml.bind.Unmarshaller |
This is the root exception class for all JAXB exceptions.
- Since:
- JAXB1.0
- Version:
- $Revision: 1.1 $ $Date: 2004/12/14 21:50:39 $
- Author:
- Ryan Shoemaker, Sun Microsystems, Inc.
- See Also:
JAXBContext
,Marshaller
,Unmarshaller
, Serialized Form
Constructor Summary | |
---|---|
JAXBException(String message)
Construct a JAXBException with the specified detail message. |
|
JAXBException(String message,
String errorCode)
Construct a JAXBException with the specified detail message and vendor specific errorCode. |
|
JAXBException(String message,
String errorCode,
Throwable exception)
Construct a JAXBException with the specified detail message, vendor specific errorCode, and linkedException. |
|
JAXBException(String message,
Throwable exception)
Construct a JAXBException with the specified detail message and linkedException. |
|
JAXBException(Throwable exception)
Construct a JAXBException with a linkedException. |
Method Summary | |
---|---|
Throwable |
getCause()
|
String |
getErrorCode()
Get the vendor specific error code |
Throwable |
getLinkedException()
Get the linked exception |
void |
printStackTrace()
Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to System.err. |
void |
printStackTrace(PrintStream s)
Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream. |
void |
printStackTrace(PrintWriter s)
Prints this JAXBException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintWriter. |
void |
setLinkedException(Throwable exception)
Add a linked Exception. |
String |
toString()
Returns a short description of this JAXBException. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
JAXBException(String message)
构造带指定详细消息的 JAXBException。errorCode 和 linkedException 将默认为 null。
message | 对异常的描述 |
JAXBException
public JAXBException(String message)
- Construct a JAXBException with the specified detail message. The
errorCode and linkedException will default to null.
- Parameters:
message
- a description of the exception
public
JAXBException(String message, String errorCode)
构造带指定详细消息和特定于供应商的 errorCode 的 JAXBException。linkedException 将默认为 null。
message | 对异常的描述 |
errorCode | 指定特定于供应商的错误代码的字符串 |
JAXBException
public JAXBException(String message, String errorCode)
- Construct a JAXBException with the specified detail message and vendor
specific errorCode. The linkedException will default to null.
- Parameters:
message
- a description of the exceptionerrorCode
- a string specifying the vendor specific error code
public
JAXBException(Throwable exception)
构造带有一个 linkedException 的 JAXBException。详细消息和特定于供应商的 errorCode 将默认为 null。
exception | 链接的异常 |
JAXBException
public JAXBException(Throwable exception)
- Construct a JAXBException with a linkedException. The detail message and
vendor specific errorCode will default to null.
- Parameters:
exception
- the linked exception
public
JAXBException(String message, Throwable exception)
构造带指定的详细消息和 linkedException 的 JAXBException。errorCode 将默认为 null。
message | 对异常的描述 |
exception | 链接的异常 |
JAXBException
public JAXBException(String message, Throwable exception)
- Construct a JAXBException with the specified detail message and
linkedException. The errorCode will default to null.
- Parameters:
message
- a description of the exceptionexception
- the linked exception
public
JAXBException(String message, String errorCode, Throwable exception)
构造带指定的详细消息、特定于供应商的 errorCode 和 linkedException 的 JAXBException。
message | 对异常的描述 |
errorCode | 指定特定于供应商的错误代码的字符串 |
exception | 链接的异常 |
JAXBException
public JAXBException(String message, String errorCode, Throwable exception)
- Construct a JAXBException with the specified detail message, vendor
specific errorCode, and linkedException.
- Parameters:
message
- a description of the exceptionerrorCode
- a string specifying the vendor specific error codeexception
- the linked exception
Method Detail |
---|
public String
getErrorCode()
获取特定于供应商的错误代码。
return | 指定特定于供应商的错误代码的字符串 |
getErrorCode
public String getErrorCode()
- Get the vendor specific error code
- Returns:
- a string specifying the vendor specific error code
public Throwable
getLinkedException()
获取链接的异常。
return | 链接的异常;如果不存在,则返回 null |
getLinkedException
public Throwable getLinkedException()
- Get the linked exception
- Returns:
- the linked Exception, null if none exists
public void
setLinkedException(Throwable exception)
添加一个链接的异常。
exception | 链接的异常(允许使用 null 值,该值指示链接的异常不存在或者是未知的)。 |
setLinkedException
public void setLinkedException(Throwable exception)
- Add a linked Exception.
- Parameters:
exception
- the linked Exception (A null value is permitted and indicates that the linked exception does not exist or is unknown).
public String
toString()
返回此 JAXBException 的简短描述。
英文文档:
toString
public String toString()
public void
printStackTrace(java.io.PrintStream s)
打印此 JAXBException 及其对 PrintStream 的堆栈跟踪(如果为非 null,则包括该 linkedException 的堆栈跟踪)。
s | 用于输出的 PrintStream |
printStackTrace
public void printStackTrace(PrintStream s)
- Prints this JAXBException and its stack trace (including the stack trace
of the linkedException if it is non-null) to the PrintStream.
- Overrides:
printStackTrace
in classThrowable
- Parameters:
s
- PrintStream to use for output
public void
printStackTrace()
打印此 JAXBException 及其对 System.err 的堆栈跟踪(如果为非 null,则包括 linkedException 的堆栈跟踪)。
英文文档:
printStackTrace
public void printStackTrace()
- Prints this JAXBException and its stack trace (including the stack trace
of the linkedException if it is non-null) to System.err.
- Overrides:
printStackTrace
in classThrowable
public void
printStackTrace(java.io.PrintWriter s)
打印此 JAXBException 及其对 PrintWriter 的堆栈跟踪(如果为非 null,则包括该 linkedException 的堆栈跟踪)。
s | 用于输出的 PrintWriter |
printStackTrace
public void printStackTrace(PrintWriter s)
- Prints this JAXBException and its stack trace (including the stack trace
of the linkedException if it is non-null) to the PrintWriter.
- Overrides:
printStackTrace
in classThrowable
- Parameters:
s
- PrintWriter to use for output
英文文档:
getCause
public Throwable getCause()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!