JAXBException (Java EE 5)

Java EE API


javax.xml.bind Class JAXBException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.xml.bind.JAXBException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MarshalException, PropertyException, UnmarshalException, ValidationException

public class JAXBException
extends Exception

Extends: Throwable > Exception

这是所有 JAXB 异常的根异常类。
英文文档:

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
 
Method Summary
 Throwable
 String
 Throwable
 void
 void
 void
 void
 String
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

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 exception
errorCode - 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 exception
exception - 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 exception
errorCode - a string specifying the vendor specific error code
exception - 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()
Returns a short description of this JAXBException.

Overrides:
toString in class Throwable

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 class Throwable
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 class Throwable

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 class Throwable
Parameters:
s - PrintWriter to use for output

英文文档:

getCause

public Throwable getCause()
Overrides:
getCause in class Throwable


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!