1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.4.2_16) on Sat Mar 15 20:43:48 PDT 2008 -->
6 <META http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
8 NestableDelegate (Commons Lang
2.4 API)
11 <META NAME=
"keywords" CONTENT=
"org.apache.commons.lang.exception.NestableDelegate class">
13 <LINK REL =
"stylesheet" TYPE=
"text/css" HREF=
"../../../../../stylesheet.css" TITLE=
"Style">
15 <SCRIPT type=
"text/javascript">
16 function windowTitle()
18 parent.document.
title=
"NestableDelegate (Commons Lang 2.4 API)";
24 <BODY BGCOLOR=
"white" onload=
"windowTitle();">
27 <!-- ========= START OF TOP NAVBAR ======= -->
28 <A NAME=
"navbar_top"><!-- --></A>
29 <A HREF=
"#skip-navbar_top" title=
"Skip navigation links"></A>
30 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
32 <TD COLSPAN=
3 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
33 <A NAME=
"navbar_top_firstrow"><!-- --></A>
34 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
35 <TR ALIGN=
"center" VALIGN=
"top">
36 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
37 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
38 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
39 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/NestableDelegate.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
40 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
41 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
42 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
43 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
47 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
53 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
54 <A HREF=
"../../../../../org/apache/commons/lang/exception/ExceptionUtils.html" title=
"class in org.apache.commons.lang.exception"><B>PREV CLASS
</B></A>
55 NEXT CLASS
</FONT></TD>
56 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
57 <A HREF=
"../../../../../index.html" target=
"_top"><B>FRAMES
</B></A>
58 <A HREF=
"NestableDelegate.html" target=
"_top"><B>NO FRAMES
</B></A>
59 <SCRIPT type=
"text/javascript">
62 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
73 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
74 SUMMARY:
NESTED
|
<A HREF=
"#field_summary">FIELD
</A> |
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
75 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
76 DETAIL:
<A HREF=
"#field_detail">FIELD
</A> |
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
79 <A NAME=
"skip-navbar_top"></A>
80 <!-- ========= END OF TOP NAVBAR ========= -->
83 <!-- ======== START OF CLASS DATA ======== -->
86 org.apache.commons.lang.exception
</FONT>
88 Class NestableDelegate
</H2>
91 <IMG SRC=
"../../../../../resources/inherit.gif" ALT=
"extended by"><B>org.apache.commons.lang.exception.NestableDelegate
</B>
94 <DT><B>All Implemented Interfaces:
</B> <DD>java.io.Serializable
</DD>
98 <DT>public class
<B>NestableDelegate
</B><DT>extends java.lang.Object
<DT>implements java.io.Serializable
</DL>
101 <p>A shared implementation of the nestable exception functionality.
</p>
103 The code is shared between
104 <A HREF=
"../../../../../org/apache/commons/lang/exception/NestableError.html" title=
"class in org.apache.commons.lang.exception"><CODE>NestableError
</CODE></A>,
105 <A HREF=
"../../../../../org/apache/commons/lang/exception/NestableException.html" title=
"class in org.apache.commons.lang.exception"><CODE>NestableException
</CODE></A> and
106 <A HREF=
"../../../../../org/apache/commons/lang/exception/NestableRuntimeException.html" title=
"class in org.apache.commons.lang.exception"><CODE>NestableRuntimeException
</CODE></A>.
112 <DT><B>Since:
</B></DT>
114 <DT><B>Version:
</B></DT>
115 <DD>$Id: NestableDelegate.java
512889 2007-
02-
28 18:
18:
20Z dlr $
</DD>
116 <DT><B>Author:
</B></DT>
117 <DD><a href=
"mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski
</a>, Daniel L. Rall,
<a href=
"mailto:knielsen@apache.org">Kasper Nielsen
</a>,
<a href=
"mailto:steven@caswell.name">Steven Caswell
</a>, Sean C. Sullivan, Stephen Colebourne
</DD>
118 <DT><B>See Also:
</B><DD><A HREF=
"../../../../../serialized-form.html#org.apache.commons.lang.exception.NestableDelegate">Serialized Form
</A></DL>
122 <!-- ======== NESTED CLASS SUMMARY ======== -->
125 <!-- =========== FIELD SUMMARY =========== -->
127 <A NAME=
"field_summary"><!-- --></A>
128 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
129 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
130 <TD COLSPAN=
2><FONT SIZE=
"+2">
131 <B>Field Summary
</B></FONT></TD>
133 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
134 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
135 <CODE>static
boolean
</CODE></FONT></TD>
136 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#matchSubclasses">matchSubclasses
</A></B></CODE>
139 Whether to match subclasses via indexOf.
</TD>
141 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
142 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
143 <CODE>static
boolean
</CODE></FONT></TD>
144 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#topDown">topDown
</A></B></CODE>
147 Whether to print the stack trace top-down.
</TD>
149 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
150 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
151 <CODE>static
boolean
</CODE></FONT></TD>
152 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#trimStackFrames">trimStackFrames
</A></B></CODE>
155 Whether to trim the repeated stack trace.
</TD>
159 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
161 <A NAME=
"constructor_summary"><!-- --></A>
162 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
163 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
164 <TD COLSPAN=
2><FONT SIZE=
"+2">
165 <B>Constructor Summary
</B></FONT></TD>
167 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
168 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#NestableDelegate(org.apache.commons.lang.exception.Nestable)">NestableDelegate
</A></B>(
<A HREF=
"../../../../../org/apache/commons/lang/exception/Nestable.html" title=
"interface in org.apache.commons.lang.exception">Nestable
</A> nestable)
</CODE>
171 Constructs a new
<code>NestableDelegate
</code> instance to manage the
172 specified
<code>Nestable
</code>.
</TD>
176 <!-- ========== METHOD SUMMARY =========== -->
178 <A NAME=
"method_summary"><!-- --></A>
179 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
180 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
181 <TD COLSPAN=
2><FONT SIZE=
"+2">
182 <B>Method Summary
</B></FONT></TD>
184 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
185 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
186 <CODE> java.lang.String
</CODE></FONT></TD>
187 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getMessage(int)">getMessage
</A></B>(int
index)
</CODE>
190 Returns the error message of the
<code>Throwable
</code> in the chain of
<code>Throwable
</code>s at the
191 specified index, numbered from
0.
</TD>
193 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
194 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
195 <CODE> java.lang.String
</CODE></FONT></TD>
196 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getMessage(java.lang.String)">getMessage
</A></B>(java.lang.String
baseMsg)
</CODE>
199 Returns the full message contained by the
<code>Nestable
</code> and any nested
<code>Throwable
</code>s.
</TD>
201 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
202 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
203 <CODE> java.lang.String[]
</CODE></FONT></TD>
204 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getMessages()">getMessages
</A></B>()
</CODE>
207 Returns the error message of this and any nested
<code>Throwable
</code>s in an array of Strings, one element
208 for each message.
</TD>
210 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
211 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
212 <CODE>protected
java.lang.String[]
</CODE></FONT></TD>
213 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getStackFrames(java.lang.Throwable)">getStackFrames
</A></B>(java.lang.Throwable
t)
</CODE>
216 Captures the stack trace associated with the specified
217 <code>Throwable
</code> object, decomposing it into a list of
220 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
221 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
222 <CODE> java.lang.Throwable
</CODE></FONT></TD>
223 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getThrowable(int)">getThrowable
</A></B>(int
index)
</CODE>
226 Returns the
<code>Throwable
</code> in the chain of
227 <code>Throwable
</code>s at the specified index, numbered from
0.
</TD>
229 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
230 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
231 <CODE> int
</CODE></FONT></TD>
232 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getThrowableCount()">getThrowableCount
</A></B>()
</CODE>
235 Returns the number of
<code>Throwable
</code>s contained in the
236 <code>Nestable
</code> contained by this delegate.
</TD>
238 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
239 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
240 <CODE> java.lang.Throwable[]
</CODE></FONT></TD>
241 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getThrowables()">getThrowables
</A></B>()
</CODE>
244 Returns this delegate's
<code>Nestable
</code> and any nested
245 <code>Throwable
</code>s in an array of
<code>Throwable
</code>s, one
246 element for each
<code>Throwable
</code>.
</TD>
248 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
249 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
250 <CODE> int
</CODE></FONT></TD>
251 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#indexOfThrowable(java.lang.Class, int)">indexOfThrowable
</A></B>(java.lang.Class
type,
252 int
fromIndex)
</CODE>
255 Returns the index, numbered from
0, of the first
<code>Throwable
</code>
256 that matches the specified type, or a subclass, in the chain of
<code>Throwable
</code>s
257 with an index greater than or equal to the specified index.
</TD>
259 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
260 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
261 <CODE> void
</CODE></FONT></TD>
262 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#printStackTrace()">printStackTrace
</A></B>()
</CODE>
265 Prints the stack trace of this exception the the standar error
268 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
269 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
270 <CODE> void
</CODE></FONT></TD>
271 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#printStackTrace(java.io.PrintStream)">printStackTrace
</A></B>(java.io.PrintStream
out)
</CODE>
274 Prints the stack trace of this exception to the specified
277 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
278 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
279 <CODE> void
</CODE></FONT></TD>
280 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#printStackTrace(java.io.PrintWriter)">printStackTrace
</A></B>(java.io.PrintWriter
out)
</CODE>
283 Prints the stack trace of this exception to the specified
286 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
287 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
288 <CODE>protected
void
</CODE></FONT></TD>
289 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#trimStackFrames(java.util.List)">trimStackFrames
</A></B>(java.util.List
stacks)
</CODE>
292 Trims the stack frames.
</TD>
295 <A NAME=
"methods_inherited_from_class_java.lang.Object"><!-- --></A>
296 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
297 <TR BGCOLOR=
"#EEEEFF" CLASS=
"TableSubHeadingColor">
298 <TD><B>Methods inherited from class java.lang.Object
</B></TD>
300 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
301 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
307 <!-- ============ FIELD DETAIL =========== -->
309 <A NAME=
"field_detail"><!-- --></A>
310 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
311 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
312 <TD COLSPAN=
1><FONT SIZE=
"+2">
313 <B>Field Detail
</B></FONT></TD>
317 <A NAME=
"topDown"><!-- --></A><H3>
320 public static boolean
<B>topDown
</B></PRE>
322 <DD>Whether to print the stack trace top-down.
323 This public flag may be set by calling code, typically in initialisation.
324 This exists for backwards compatability, setting it to false will return
325 the library to v1.0 behaviour (but will affect all users of the library
329 <DT><B>Since:
</B></DT>
335 <A NAME=
"trimStackFrames"><!-- --></A><H3>
338 public static boolean
<B>trimStackFrames
</B></PRE>
340 <DD>Whether to trim the repeated stack trace.
341 This public flag may be set by calling code, typically in initialisation.
342 This exists for backwards compatability, setting it to false will return
343 the library to v1.0 behaviour (but will affect all users of the library
347 <DT><B>Since:
</B></DT>
353 <A NAME=
"matchSubclasses"><!-- --></A><H3>
356 public static boolean
<B>matchSubclasses
</B></PRE>
358 <DD>Whether to match subclasses via indexOf.
359 This public flag may be set by calling code, typically in initialisation.
360 This exists for backwards compatability, setting it to false will return
361 the library to v2.0 behaviour (but will affect all users of the library
365 <DT><B>Since:
</B></DT>
370 <!-- ========= CONSTRUCTOR DETAIL ======== -->
372 <A NAME=
"constructor_detail"><!-- --></A>
373 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
374 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
375 <TD COLSPAN=
1><FONT SIZE=
"+2">
376 <B>Constructor Detail
</B></FONT></TD>
380 <A NAME=
"NestableDelegate(org.apache.commons.lang.exception.Nestable)"><!-- --></A><H3>
381 NestableDelegate
</H3>
383 public
<B>NestableDelegate
</B>(
<A HREF=
"../../../../../org/apache/commons/lang/exception/Nestable.html" title=
"interface in org.apache.commons.lang.exception">Nestable
</A> nestable)
</PRE>
385 <DD>Constructs a new
<code>NestableDelegate
</code> instance to manage the
386 specified
<code>Nestable
</code>.
388 <DT><B>Parameters:
</B><DD><CODE>nestable
</CODE> - the Nestable implementation (
<i>must
</i> extend
389 <CODE>Throwable
</CODE>)
<DT><B>Since:
</B></DT>
393 <!-- ============ METHOD DETAIL ========== -->
395 <A NAME=
"method_detail"><!-- --></A>
396 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
397 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
398 <TD COLSPAN=
1><FONT SIZE=
"+2">
399 <B>Method Detail
</B></FONT></TD>
403 <A NAME=
"getMessage(int)"><!-- --></A><H3>
406 public java.lang.String
<B>getMessage
</B>(int
index)
</PRE>
408 <DD>Returns the error message of the
<code>Throwable
</code> in the chain of
<code>Throwable
</code>s at the
409 specified index, numbered from
0.
415 <DT><B>Parameters:
</B><DD><CODE>index
</CODE> - the index of the
<code>Throwable
</code> in the chain of
<code>Throwable
</code>s
416 <DT><B>Returns:
</B><DD>the error message, or null if the
<code>Throwable
</code> at the specified index in the chain does not
419 <DD><CODE>java.lang.IndexOutOfBoundsException
</CODE> - if the
<code>index
</code> argument is negative or not less than the count of
<code>Throwable
</code>s
420 in the chain
<DT><B>Since:
</B></DT>
427 <A NAME=
"getMessage(java.lang.String)"><!-- --></A><H3>
430 public java.lang.String
<B>getMessage
</B>(java.lang.String
baseMsg)
</PRE>
432 <DD>Returns the full message contained by the
<code>Nestable
</code> and any nested
<code>Throwable
</code>s.
438 <DT><B>Parameters:
</B><DD><CODE>baseMsg
</CODE> - the base message to use when creating the full message. Should be generally be called via
439 <code>nestableHelper.getMessage(super.getMessage())
</code>, where
<code>super
</code> is an
440 instance of
<CODE>Throwable
</CODE>.
441 <DT><B>Returns:
</B><DD>The concatenated message for this and all nested
<code>Throwable
</code>s
<DT><B>Since:
</B></DT>
448 <A NAME=
"getMessages()"><!-- --></A><H3>
451 public java.lang.String[]
<B>getMessages
</B>()
</PRE>
453 <DD>Returns the error message of this and any nested
<code>Throwable
</code>s in an array of Strings, one element
454 for each message. Any
<code>Throwable
</code> not containing a message is represented in the array by a null.
455 This has the effect of cause the length of the returned array to be equal to the result of the
456 <A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getThrowableCount()"><CODE>getThrowableCount()
</CODE></A> operation.
463 <DT><B>Returns:
</B><DD>the error messages
<DT><B>Since:
</B></DT>
470 <A NAME=
"getThrowable(int)"><!-- --></A><H3>
473 public java.lang.Throwable
<B>getThrowable
</B>(int
index)
</PRE>
475 <DD>Returns the
<code>Throwable
</code> in the chain of
476 <code>Throwable
</code>s at the specified index, numbered from
0.
482 <DT><B>Parameters:
</B><DD><CODE>index
</CODE> - the index, numbered from
0, of the
<code>Throwable
</code> in
483 the chain of
<code>Throwable
</code>s
484 <DT><B>Returns:
</B><DD>the
<code>Throwable
</code>
486 <DD><CODE>java.lang.IndexOutOfBoundsException
</CODE> - if the
<code>index
</code> argument is
487 negative or not less than the count of
<code>Throwable
</code>s in the
488 chain
<DT><B>Since:
</B></DT>
495 <A NAME=
"getThrowableCount()"><!-- --></A><H3>
496 getThrowableCount
</H3>
498 public int
<B>getThrowableCount
</B>()
</PRE>
500 <DD>Returns the number of
<code>Throwable
</code>s contained in the
501 <code>Nestable
</code> contained by this delegate.
508 <DT><B>Returns:
</B><DD>the throwable count
<DT><B>Since:
</B></DT>
515 <A NAME=
"getThrowables()"><!-- --></A><H3>
518 public java.lang.Throwable[]
<B>getThrowables
</B>()
</PRE>
520 <DD>Returns this delegate's
<code>Nestable
</code> and any nested
521 <code>Throwable
</code>s in an array of
<code>Throwable
</code>s, one
522 element for each
<code>Throwable
</code>.
529 <DT><B>Returns:
</B><DD>the
<code>Throwable
</code>s
<DT><B>Since:
</B></DT>
536 <A NAME=
"indexOfThrowable(java.lang.Class, int)"><!-- --></A><H3>
537 indexOfThrowable
</H3>
539 public int
<B>indexOfThrowable
</B>(java.lang.Class
type,
540 int
fromIndex)
</PRE>
542 <DD>Returns the index, numbered from
0, of the first
<code>Throwable
</code>
543 that matches the specified type, or a subclass, in the chain of
<code>Throwable
</code>s
544 with an index greater than or equal to the specified index.
545 The method returns -
1 if the specified type is not found in the chain.
547 NOTE: From v2.1, we have clarified the
<code>Nestable
</code> interface
548 such that this method matches subclasses.
549 If you want to NOT match subclasses, please use
550 <A HREF=
"../../../../../org/apache/commons/lang/exception/ExceptionUtils.html#indexOfThrowable(java.lang.Throwable, java.lang.Class, int)"><CODE>ExceptionUtils.indexOfThrowable(Throwable, Class, int)
</CODE></A>
551 (which is avaiable in all versions of lang).
552 An alternative is to use the public static flag
<A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#matchSubclasses"><CODE>matchSubclasses
</CODE></A>
553 on
<code>NestableDelegate
</code>, however this is not recommended.
559 <DT><B>Parameters:
</B><DD><CODE>type
</CODE> - the type to find, subclasses match, null returns -
1<DD><CODE>fromIndex
</CODE> - the index, numbered from
0, of the starting position in
560 the chain to be searched
561 <DT><B>Returns:
</B><DD>index of the first occurrence of the type in the chain, or -
1 if
562 the type is not found
564 <DD><CODE>java.lang.IndexOutOfBoundsException
</CODE> - if the
<code>fromIndex
</code> argument
565 is negative or not less than the count of
<code>Throwable
</code>s in the
566 chain
<DT><B>Since:
</B></DT>
573 <A NAME=
"printStackTrace()"><!-- --></A><H3>
576 public void
<B>printStackTrace
</B>()
</PRE>
578 <DD>Prints the stack trace of this exception the the standar error
590 <A NAME=
"printStackTrace(java.io.PrintStream)"><!-- --></A><H3>
593 public void
<B>printStackTrace
</B>(java.io.PrintStream
out)
</PRE>
595 <DD>Prints the stack trace of this exception to the specified
602 <DT><B>Parameters:
</B><DD><CODE>out
</CODE> -
<code>PrintStream
</code> to use for output.
<DT><B>See Also:
</B><DD><A HREF=
"../../../../../org/apache/commons/lang/exception/NestableDelegate.html#printStackTrace(java.io.PrintWriter)"><CODE>printStackTrace(PrintWriter)
</CODE></A></DL>
607 <A NAME=
"printStackTrace(java.io.PrintWriter)"><!-- --></A><H3>
610 public void
<B>printStackTrace
</B>(java.io.PrintWriter
out)
</PRE>
612 <DD>Prints the stack trace of this exception to the specified
613 writer. If the Throwable class has a
<code>getCause
</code>
614 method (i.e. running on jre1.4 or higher), this method just
615 uses Throwable's printStackTrace() method. Otherwise, generates
616 the stack-trace, by taking into account the 'topDown' and
617 'trimStackFrames' parameters. The topDown and trimStackFrames
618 are set to 'true' by default (produces jre1.4-like stack trace).
624 <DT><B>Parameters:
</B><DD><CODE>out
</CODE> -
<code>PrintWriter
</code> to use for output.
</DL>
629 <A NAME=
"getStackFrames(java.lang.Throwable)"><!-- --></A><H3>
632 protected java.lang.String[]
<B>getStackFrames
</B>(java.lang.Throwable
t)
</PRE>
634 <DD>Captures the stack trace associated with the specified
635 <code>Throwable
</code> object, decomposing it into a list of
642 <DT><B>Parameters:
</B><DD><CODE>t
</CODE> - The
<code>Throwable
</code>.
643 <DT><B>Returns:
</B><DD>An array of strings describing each stack frame.
<DT><B>Since:
</B></DT>
650 <A NAME=
"trimStackFrames(java.util.List)"><!-- --></A><H3>
653 protected void
<B>trimStackFrames
</B>(java.util.List
stacks)
</PRE>
655 <DD>Trims the stack frames. The first set is left untouched. The rest
656 of the frames are truncated from the bottom by comparing with
663 <DT><B>Parameters:
</B><DD><CODE>stacks
</CODE> - The list containing String[] elements
<DT><B>Since:
</B></DT>
668 <!-- ========= END OF CLASS DATA ========= -->
672 <!-- ======= START OF BOTTOM NAVBAR ====== -->
673 <A NAME=
"navbar_bottom"><!-- --></A>
674 <A HREF=
"#skip-navbar_bottom" title=
"Skip navigation links"></A>
675 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
677 <TD COLSPAN=
3 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
678 <A NAME=
"navbar_bottom_firstrow"><!-- --></A>
679 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
680 <TR ALIGN=
"center" VALIGN=
"top">
681 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
682 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
683 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
684 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/NestableDelegate.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
685 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
686 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
687 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
688 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
692 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
698 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
699 <A HREF=
"../../../../../org/apache/commons/lang/exception/ExceptionUtils.html" title=
"class in org.apache.commons.lang.exception"><B>PREV CLASS
</B></A>
700 NEXT CLASS
</FONT></TD>
701 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
702 <A HREF=
"../../../../../index.html" target=
"_top"><B>FRAMES
</B></A>
703 <A HREF=
"NestableDelegate.html" target=
"_top"><B>NO FRAMES
</B></A>
704 <SCRIPT type=
"text/javascript">
707 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
712 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
718 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
719 SUMMARY:
NESTED
|
<A HREF=
"#field_summary">FIELD
</A> |
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
720 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
721 DETAIL:
<A HREF=
"#field_detail">FIELD
</A> |
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
724 <A NAME=
"skip-navbar_bottom"></A>
725 <!-- ======== END OF BOTTOM NAVBAR ======= -->
728 Copyright ©
2001-
2008 <a href=
"http://www.apache.org/">The Apache Software Foundation
</a>. All Rights Reserved.