|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Throwable の実装にルートとなる例外を
内部にネストして持つことができるように拡張を行うインターフェイスです。
| メソッドの概要 | |
Throwable |
getCause()
Nestable が実装された例外の原因となった例外またはエラーの参照を返します。
|
String |
getMessage()
この例外とネストされた Throwable のエラーメッセージを返します。
|
String |
getMessage(int index)
内部に保持されている Throwable のうち、0 から始まる指定されたインデックスに該当する
Throwable のメッセージを返します。
|
String[] |
getMessages()
この例外と内部にネストされる Throwable のエラーメッセージをStringの配列に格納して返します。
|
Throwable |
getThrowable(int index)
内部に保持されている Throwable のうち、0 から始まる指定されたインデックスに該当する
Throwable を返します。
|
int |
getThrowableCount()
この Nestable に含まれるネストされた Throwable の数を返します。
|
Throwable[] |
getThrowables()
この Nestable と、内部にネストされた Throwable
を Throwable の配列に格納して返します。
|
int |
indexOfThrowable(Class type)
内部にネストされた Throwable の中から、最初に見つかった指定された型の 0 から始まるインデックスを返します。
|
int |
indexOfThrowable(Class type,
int fromIndex)
内部にネストされた Throwable から、最初に見つかった指定された型の、検索開始位置より後ろの
0 から始まるインデックスを返します。
|
void |
printPartialStackTrace(PrintWriter out)
指定された writer に対してルートとなる(ネストされたものを含まない)例外のスタックトレースを出力します。 |
void |
printStackTrace(PrintStream out)
指定された print stream に対してこの例外のスタックトレースを出力します。 |
void |
printStackTrace(PrintWriter out)
指定された print writer に対してこの例外のスタックトレースを出力します。 |
| メソッドの詳細 |
public Throwable getCause()
Nestable が実装された例外の原因となった例外またはエラーの参照を返します。
Nestable to be thrown.
public String getMessage()
Throwable のエラーメッセージを返します。
Throwable.
public String getMessage(int index)
Throwable のうち、0 から始まる指定されたインデックスに該当する
Throwable のメッセージを返します。
Throwable in the chain
of Throwables at the specified index, numbererd from 0.
index - 内部に保持されている Throwable のインデックス
Throwable in the chain of
ThrowablesThrowable
にメッセージが設定されていない場合には null
Throwable at the
specified index in the chain does not contain a messageIndexOutOfBoundsException - index の値がマイナスまたは内部の Throwable
の数が指定された値よりも少ない場合
index argument is
negative or not less than the count of Throwables in the
chainpublic String[] getMessages()
Throwable のエラーメッセージをStringの配列に格納して返します。
メッセージを持たない Throwable のメッセージは null で表現されます。
返される配列の長さは原因の数を示す getThrowableCount() の返す値と一致します。
Throwables
in an array of Strings, one element for each message. Any
Throwable not containing a message is represented in the
array by a null. This has the effect of cause the length of the returned
array to be equal to the result of the {@link #getThrowableCount()}
operation.
public Throwable getThrowable(int index)
Throwable のうち、0 から始まる指定されたインデックスに該当する
Throwable を返します。
Throwable in the chain of
Throwables at the specified index, numbererd from 0.
index - 内部に保持される Throwable の 0 から始まるインデックス
Throwable in
the chain of ThrowablesThrowable
ThrowableIndexOutOfBoundsException - index の値がマイナスまたは内部の Throwable
の数が指定された値よりも少ない場合
index argument is
negative or not less than the count of Throwables in the
chainpublic int getThrowableCount()
Nestable に含まれるネストされた Throwable の数を返します。
Throwables represented by
this Nestable, including this Nestable.
public Throwable[] getThrowables()
Nestable と、内部にネストされた Throwable
を Throwable の配列に格納して返します。
Nestable and any nested Throwables
in an array of Throwables, one element for each
Throwable.
Throwable の配列
Throwablespublic int indexOfThrowable(Class type)
Throwable の中から、最初に見つかった指定された型の 0 から始まるインデックスを返します。
該当するものが見つからなかった場合には -1 を返します。
Throwable Throwables, or -1 if the
specified type is not found in the chain.
type - 検索対象となる Class
Class to be found
public int indexOfThrowable(Class type,
int fromIndex)
Throwable から、最初に見つかった指定された型の、検索開始位置より後ろの
0 から始まるインデックスを返します。
該当するものが見つからなかった場合には -1 を返します。
Throwable
that matches the specified type in the chain of Throwables
with an index greater than or equal to the specified index, or -1 if
the type is not found.
type - 検索対象となる Class
Class to be foundfromIndex - 検索の開始位置となる 0 から始まるインデックス
IndexOutOfBoundsException - fromIndexの値がマイナスまたは内部の
Throwable の数が指定された値よりも少ない場合
fromIndex argument
is negative or not less than the count of Throwables in the
chainpublic void printStackTrace(PrintWriter out)
out - 出力に使用される PrintWriter
PrintWriter to use for output.public void printStackTrace(PrintStream out)
out - 出力に使用される PrintStream
PrintStream to use for output.public void printPartialStackTrace(PrintWriter out)
NestableDelegate
から、個々のスタックトレースをバッファに出力するために使用されます。
このメソッドの実装は大体の場合 super.printStackTrace(out); を呼ぶべきです。
super.printStackTrace(out); in most cases.
out - 使用される writer
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||