JavaTM Platform
Standard Ed. 6

javax.xml.bind
クラス JAXBException

java.lang.Object
  上位を拡張 java.lang.Throwable
      上位を拡張 java.lang.Exception
          上位を拡張 javax.xml.bind.JAXBException
すべての実装されたインタフェース:
Serializable
直系の既知のサブクラス:
MarshalException, PropertyException, UnmarshalException, ValidationException

public class JAXBException
extends Exception

これは、すべての JAXB 例外のルート例外クラスです。

導入されたバージョン:
JAXB1.0
関連項目:
JAXBContext, Marshaller, Unmarshaller, 直列化された形式

コンストラクタの概要
JAXBException(String message)
          指定された詳細メッセージを持つ JAXBException を構築します。
JAXBException(String message, String errorCode)
          指定された詳細メッセージとベンダー固有の errorCode を持つ JAXBException を構築します。
JAXBException(String message, String errorCode, Throwable exception)
          指定された詳細メッセージ、ベンダー固有の errorCode、linkedException を持つ JAXBException を構築します。
JAXBException(String message, Throwable exception)
          指定された詳細メッセージと linkedException を持つ JAXBException を構築します。
JAXBException(Throwable exception)
          linkedException を持つ JAXBException を構築します。
 
メソッドの概要
 Throwable getCause()
          原因が存在しないか不明な場合に、この Throwable または null の原因を返します。
 String getErrorCode()
          ベンダー固有のエラーコードを取得します。
 Throwable getLinkedException()
          リンクされた例外を取得します。
 void printStackTrace()
          この JAXBException とそのスタックトレース (linkedException が null 以外の場合、そのスタックトレースを含む) を System.err に出力します。
 void printStackTrace(PrintStream s)
          この JAXBException とそのスタックトレース (linkedException が null 以外の場合、そのスタックトレースを含む) を PrintStream に出力します。
 void printStackTrace(PrintWriter s)
          この JAXBException とそのスタックトレース (linkedException が null 以外の場合、そのスタックトレースを含む) を PrintWriter に出力します。
 void setLinkedException(Throwable exception)
          リンクされた例外を追加します。
 String toString()
          この JAXBException の短い説明を返します。
 
クラス java.lang.Throwable から継承されたメソッド
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

JAXBException

public JAXBException(String message)
指定された詳細メッセージを持つ JAXBException を構築します。errorCode と linkedException はデフォルトで null になります。

パラメータ:
message - 例外の説明

JAXBException

public JAXBException(String message,
                     String errorCode)
指定された詳細メッセージとベンダー固有の errorCode を持つ JAXBException を構築します。linkedException はデフォルトで null になります。

パラメータ:
message - 例外の説明
errorCode - ベンダー固有のエラーコードを指定する文字列

JAXBException

public JAXBException(Throwable exception)
linkedException を持つ JAXBException を構築します。詳細メッセージとベンダー固有の errorCode はデフォルトで null になります。

パラメータ:
exception - リンクされた例外

JAXBException

public JAXBException(String message,
                     Throwable exception)
指定された詳細メッセージと linkedException を持つ JAXBException を構築します。errorCode はデフォルトで null になります。

パラメータ:
message - 例外の説明
exception - リンクされた例外

JAXBException

public JAXBException(String message,
                     String errorCode,
                     Throwable exception)
指定された詳細メッセージ、ベンダー固有の errorCode、linkedException を持つ JAXBException を構築します。

パラメータ:
message - 例外の説明
errorCode - ベンダー固有のエラーコードを指定する文字列
exception - リンクされた例外
メソッドの詳細

getErrorCode

public String getErrorCode()
ベンダー固有のエラーコードを取得します。

戻り値:
ベンダー固有のエラーコードを指定する文字列

getLinkedException

public Throwable getLinkedException()
リンクされた例外を取得します。

戻り値:
リンクされた例外。ない場合は null

setLinkedException

public void setLinkedException(Throwable exception)
リンクされた例外を追加します。

パラメータ:
exception - リンクされた例外 (null 値は許可されており、リンクされた例外が 存在しないか不明なことを示す)

toString

public String toString()
この JAXBException の短い説明を返します。

オーバーライド:
クラス Throwable 内の toString
戻り値:
このスロー可能オブジェクトの文字列表現

printStackTrace

public void printStackTrace(PrintStream s)
この JAXBException とそのスタックトレース (linkedException が null 以外の場合、そのスタックトレースを含む) を PrintStream に出力します。

オーバーライド:
クラス Throwable 内の printStackTrace
パラメータ:
s - 出力に使用する PrintStream

printStackTrace

public void printStackTrace()
この JAXBException とそのスタックトレース (linkedException が null 以外の場合、そのスタックトレースを含む) を System.err に出力します。

オーバーライド:
クラス Throwable 内の printStackTrace

printStackTrace

public void printStackTrace(PrintWriter s)
この JAXBException とそのスタックトレース (linkedException が null 以外の場合、そのスタックトレースを含む) を PrintWriter に出力します。

オーバーライド:
クラス Throwable 内の printStackTrace
パラメータ:
s - 出力に使用する PrintWriter

getCause

public Throwable getCause()
クラス Throwable の記述:
原因が存在しないか不明な場合に、この Throwable または null の原因を返します。原因はこの Throwable をスローさせた Throwable です。

この実装は、Throwable を要求するいずれかのコンストラクタ経由で提供された原因、または Throwable.initCause(Throwable) メソッドを使用して作成後に設定された原因を返します。通常、このメソッドをオーバーライドする必要はありませんが、サブクラスはこのメソッドをオーバーライドして、ほかの何らかの方法で設定された原因を返すことができます。これは、チェーンされた例外の Throwable への追加前に実行される「レガシー連鎖スロー可能オブジェクト」の場合に適切な動作です。PrintStackTrace メソッドのいずれかをオーバーライドする必要はありません。 これらのメソッドはすべて getCause メソッドを呼び出して、スロー可能オブジェクトの原因を判別します。

オーバーライド:
クラス Throwable 内の getCause
戻り値:
スロー可能なオブジェクトの原因。原因が存在しないか不明の場合は null

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。