a whole bunch of stuff
[ephemerata.git] / Toady / lib / commons-lang-2.4 / apidocs / org / apache / commons / lang / exception / NestableDelegate.html
blobbb4b6efb4cd474ce1bf03f5f1fb6603707d1980d
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
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">
7 <TITLE>
8 NestableDelegate (Commons Lang 2.4 API)
9 </TITLE>
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)";
20 </SCRIPT>
22 </HEAD>
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="">
31 <TR>
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>&nbsp;</TD>
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
38 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NestableDelegate.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44 </TR>
45 </TABLE>
46 </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48 </EM>
49 </TD>
50 </TR>
52 <TR>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 &nbsp;<A HREF="../../../../../org/apache/commons/lang/exception/ExceptionUtils.html" title="class in org.apache.commons.lang.exception"><B>PREV CLASS</B></A>&nbsp;
55 &nbsp;NEXT CLASS</FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
58 &nbsp;<A HREF="NestableDelegate.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
59 &nbsp;<SCRIPT type="text/javascript">
60 <!--
61 if(window==top) {
62 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
64 //-->
65 </SCRIPT>
66 <NOSCRIPT>
67 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
68 </NOSCRIPT>
70 </FONT></TD>
71 </TR>
72 <TR>
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
75 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
77 </TR>
78 </TABLE>
79 <A NAME="skip-navbar_top"></A>
80 <!-- ========= END OF TOP NAVBAR ========= -->
82 <HR>
83 <!-- ======== START OF CLASS DATA ======== -->
84 <H2>
85 <FONT SIZE="-1">
86 org.apache.commons.lang.exception</FONT>
87 <BR>
88 Class NestableDelegate</H2>
89 <PRE>
90 java.lang.Object
91 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.commons.lang.exception.NestableDelegate</B>
92 </PRE>
93 <DL>
94 <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
95 </DL>
96 <HR>
97 <DL>
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>.
107 </p>
111 <DL>
112 <DT><B>Since:</B></DT>
113 <DD>1.0</DD>
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>
119 <HR>
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>
132 </TR>
133 <TR BGCOLOR="white" CLASS="TableRowColor">
134 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135 <CODE>static&nbsp;boolean</CODE></FONT></TD>
136 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#matchSubclasses">matchSubclasses</A></B></CODE>
138 <BR>
139 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether to match subclasses via indexOf.</TD>
140 </TR>
141 <TR BGCOLOR="white" CLASS="TableRowColor">
142 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143 <CODE>static&nbsp;boolean</CODE></FONT></TD>
144 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#topDown">topDown</A></B></CODE>
146 <BR>
147 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether to print the stack trace top-down.</TD>
148 </TR>
149 <TR BGCOLOR="white" CLASS="TableRowColor">
150 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151 <CODE>static&nbsp;boolean</CODE></FONT></TD>
152 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#trimStackFrames">trimStackFrames</A></B></CODE>
154 <BR>
155 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether to trim the repeated stack trace.</TD>
156 </TR>
157 </TABLE>
158 &nbsp;
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>
166 </TR>
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>&nbsp;nestable)</CODE>
170 <BR>
171 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <code>NestableDelegate</code> instance to manage the
172 specified <code>Nestable</code>.</TD>
173 </TR>
174 </TABLE>
175 &nbsp;
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>
183 </TR>
184 <TR BGCOLOR="white" CLASS="TableRowColor">
185 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
186 <CODE>&nbsp;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&nbsp;index)</CODE>
189 <BR>
190 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
192 </TR>
193 <TR BGCOLOR="white" CLASS="TableRowColor">
194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195 <CODE>&nbsp;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&nbsp;baseMsg)</CODE>
198 <BR>
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full message contained by the <code>Nestable</code> and any nested <code>Throwable</code>s.</TD>
200 </TR>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>&nbsp;java.lang.String[]</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getMessages()">getMessages</A></B>()</CODE>
206 <BR>
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
209 </TR>
210 <TR BGCOLOR="white" CLASS="TableRowColor">
211 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212 <CODE>protected &nbsp;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&nbsp;t)</CODE>
215 <BR>
216 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Captures the stack trace associated with the specified
217 <code>Throwable</code> object, decomposing it into a list of
218 stack frames.</TD>
219 </TR>
220 <TR BGCOLOR="white" CLASS="TableRowColor">
221 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
222 <CODE>&nbsp;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&nbsp;index)</CODE>
225 <BR>
226 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>Throwable</code> in the chain of
227 <code>Throwable</code>s at the specified index, numbered from 0.</TD>
228 </TR>
229 <TR BGCOLOR="white" CLASS="TableRowColor">
230 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
231 <CODE>&nbsp;int</CODE></FONT></TD>
232 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getThrowableCount()">getThrowableCount</A></B>()</CODE>
234 <BR>
235 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of <code>Throwable</code>s contained in the
236 <code>Nestable</code> contained by this delegate.</TD>
237 </TR>
238 <TR BGCOLOR="white" CLASS="TableRowColor">
239 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240 <CODE>&nbsp;java.lang.Throwable[]</CODE></FONT></TD>
241 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#getThrowables()">getThrowables</A></B>()</CODE>
243 <BR>
244 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
247 </TR>
248 <TR BGCOLOR="white" CLASS="TableRowColor">
249 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
250 <CODE>&nbsp;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&nbsp;type,
252 int&nbsp;fromIndex)</CODE>
254 <BR>
255 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
258 </TR>
259 <TR BGCOLOR="white" CLASS="TableRowColor">
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261 <CODE>&nbsp;void</CODE></FONT></TD>
262 <TD><CODE><B><A HREF="../../../../../org/apache/commons/lang/exception/NestableDelegate.html#printStackTrace()">printStackTrace</A></B>()</CODE>
264 <BR>
265 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints the stack trace of this exception the the standar error
266 stream.</TD>
267 </TR>
268 <TR BGCOLOR="white" CLASS="TableRowColor">
269 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
270 <CODE>&nbsp;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&nbsp;out)</CODE>
273 <BR>
274 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints the stack trace of this exception to the specified
275 stream.</TD>
276 </TR>
277 <TR BGCOLOR="white" CLASS="TableRowColor">
278 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
279 <CODE>&nbsp;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&nbsp;out)</CODE>
282 <BR>
283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints the stack trace of this exception to the specified
284 writer.</TD>
285 </TR>
286 <TR BGCOLOR="white" CLASS="TableRowColor">
287 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
288 <CODE>protected &nbsp;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&nbsp;stacks)</CODE>
291 <BR>
292 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trims the stack frames.</TD>
293 </TR>
294 </TABLE>
295 &nbsp;<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>
299 </TR>
300 <TR BGCOLOR="white" CLASS="TableRowColor">
301 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
302 </TR>
303 </TABLE>
304 &nbsp;
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>
314 </TR>
315 </TABLE>
317 <A NAME="topDown"><!-- --></A><H3>
318 topDown</H3>
319 <PRE>
320 public static boolean <B>topDown</B></PRE>
321 <DL>
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
326 in the classloader).
328 <DL>
329 <DT><B>Since:</B></DT>
330 <DD>2.0</DD>
331 </DL>
332 </DL>
333 <HR>
335 <A NAME="trimStackFrames"><!-- --></A><H3>
336 trimStackFrames</H3>
337 <PRE>
338 public static boolean <B>trimStackFrames</B></PRE>
339 <DL>
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
344 in the classloader).
346 <DL>
347 <DT><B>Since:</B></DT>
348 <DD>2.0</DD>
349 </DL>
350 </DL>
351 <HR>
353 <A NAME="matchSubclasses"><!-- --></A><H3>
354 matchSubclasses</H3>
355 <PRE>
356 public static boolean <B>matchSubclasses</B></PRE>
357 <DL>
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
362 in the classloader).
364 <DL>
365 <DT><B>Since:</B></DT>
366 <DD>2.1</DD>
367 </DL>
368 </DL>
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>
377 </TR>
378 </TABLE>
380 <A NAME="NestableDelegate(org.apache.commons.lang.exception.Nestable)"><!-- --></A><H3>
381 NestableDelegate</H3>
382 <PRE>
383 public <B>NestableDelegate</B>(<A HREF="../../../../../org/apache/commons/lang/exception/Nestable.html" title="interface in org.apache.commons.lang.exception">Nestable</A>&nbsp;nestable)</PRE>
384 <DL>
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>
390 <DD>2.0</DD>
391 </DL>
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>
400 </TR>
401 </TABLE>
403 <A NAME="getMessage(int)"><!-- --></A><H3>
404 getMessage</H3>
405 <PRE>
406 public java.lang.String <B>getMessage</B>(int&nbsp;index)</PRE>
407 <DL>
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.
411 <DD><DL>
412 </DL>
413 </DD>
414 <DD><DL>
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
417 contain a message
418 <DT><B>Throws:</B>
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>
421 <DD>2.0</DD>
422 </DL>
423 </DD>
424 </DL>
425 <HR>
427 <A NAME="getMessage(java.lang.String)"><!-- --></A><H3>
428 getMessage</H3>
429 <PRE>
430 public java.lang.String <B>getMessage</B>(java.lang.String&nbsp;baseMsg)</PRE>
431 <DL>
432 <DD>Returns the full message contained by the <code>Nestable</code> and any nested <code>Throwable</code>s.
434 <DD><DL>
435 </DL>
436 </DD>
437 <DD><DL>
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>
442 <DD>2.0</DD>
443 </DL>
444 </DD>
445 </DL>
446 <HR>
448 <A NAME="getMessages()"><!-- --></A><H3>
449 getMessages</H3>
450 <PRE>
451 public java.lang.String[] <B>getMessages</B>()</PRE>
452 <DL>
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.
458 <DD><DL>
459 </DL>
460 </DD>
461 <DD><DL>
463 <DT><B>Returns:</B><DD>the error messages<DT><B>Since:</B></DT>
464 <DD>2.0</DD>
465 </DL>
466 </DD>
467 </DL>
468 <HR>
470 <A NAME="getThrowable(int)"><!-- --></A><H3>
471 getThrowable</H3>
472 <PRE>
473 public java.lang.Throwable <B>getThrowable</B>(int&nbsp;index)</PRE>
474 <DL>
475 <DD>Returns the <code>Throwable</code> in the chain of
476 <code>Throwable</code>s at the specified index, numbered from 0.
478 <DD><DL>
479 </DL>
480 </DD>
481 <DD><DL>
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>
485 <DT><B>Throws:</B>
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>
489 <DD>2.0</DD>
490 </DL>
491 </DD>
492 </DL>
493 <HR>
495 <A NAME="getThrowableCount()"><!-- --></A><H3>
496 getThrowableCount</H3>
497 <PRE>
498 public int <B>getThrowableCount</B>()</PRE>
499 <DL>
500 <DD>Returns the number of <code>Throwable</code>s contained in the
501 <code>Nestable</code> contained by this delegate.
503 <DD><DL>
504 </DL>
505 </DD>
506 <DD><DL>
508 <DT><B>Returns:</B><DD>the throwable count<DT><B>Since:</B></DT>
509 <DD>2.0</DD>
510 </DL>
511 </DD>
512 </DL>
513 <HR>
515 <A NAME="getThrowables()"><!-- --></A><H3>
516 getThrowables</H3>
517 <PRE>
518 public java.lang.Throwable[] <B>getThrowables</B>()</PRE>
519 <DL>
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>.
524 <DD><DL>
525 </DL>
526 </DD>
527 <DD><DL>
529 <DT><B>Returns:</B><DD>the <code>Throwable</code>s<DT><B>Since:</B></DT>
530 <DD>2.0</DD>
531 </DL>
532 </DD>
533 </DL>
534 <HR>
536 <A NAME="indexOfThrowable(java.lang.Class, int)"><!-- --></A><H3>
537 indexOfThrowable</H3>
538 <PRE>
539 public int <B>indexOfThrowable</B>(java.lang.Class&nbsp;type,
540 int&nbsp;fromIndex)</PRE>
541 <DL>
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.
555 <DD><DL>
556 </DL>
557 </DD>
558 <DD><DL>
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
563 <DT><B>Throws:</B>
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>
567 <DD>2.0</DD>
568 </DL>
569 </DD>
570 </DL>
571 <HR>
573 <A NAME="printStackTrace()"><!-- --></A><H3>
574 printStackTrace</H3>
575 <PRE>
576 public void <B>printStackTrace</B>()</PRE>
577 <DL>
578 <DD>Prints the stack trace of this exception the the standar error
579 stream.
581 <DD><DL>
582 </DL>
583 </DD>
584 <DD><DL>
585 </DL>
586 </DD>
587 </DL>
588 <HR>
590 <A NAME="printStackTrace(java.io.PrintStream)"><!-- --></A><H3>
591 printStackTrace</H3>
592 <PRE>
593 public void <B>printStackTrace</B>(java.io.PrintStream&nbsp;out)</PRE>
594 <DL>
595 <DD>Prints the stack trace of this exception to the specified
596 stream.
598 <DD><DL>
599 </DL>
600 </DD>
601 <DD><DL>
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>
603 </DD>
604 </DL>
605 <HR>
607 <A NAME="printStackTrace(java.io.PrintWriter)"><!-- --></A><H3>
608 printStackTrace</H3>
609 <PRE>
610 public void <B>printStackTrace</B>(java.io.PrintWriter&nbsp;out)</PRE>
611 <DL>
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).
620 <DD><DL>
621 </DL>
622 </DD>
623 <DD><DL>
624 <DT><B>Parameters:</B><DD><CODE>out</CODE> - <code>PrintWriter</code> to use for output.</DL>
625 </DD>
626 </DL>
627 <HR>
629 <A NAME="getStackFrames(java.lang.Throwable)"><!-- --></A><H3>
630 getStackFrames</H3>
631 <PRE>
632 protected java.lang.String[] <B>getStackFrames</B>(java.lang.Throwable&nbsp;t)</PRE>
633 <DL>
634 <DD>Captures the stack trace associated with the specified
635 <code>Throwable</code> object, decomposing it into a list of
636 stack frames.
638 <DD><DL>
639 </DL>
640 </DD>
641 <DD><DL>
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>
644 <DD>2.0</DD>
645 </DL>
646 </DD>
647 </DL>
648 <HR>
650 <A NAME="trimStackFrames(java.util.List)"><!-- --></A><H3>
651 trimStackFrames</H3>
652 <PRE>
653 protected void <B>trimStackFrames</B>(java.util.List&nbsp;stacks)</PRE>
654 <DL>
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
657 one just on top.
659 <DD><DL>
660 </DL>
661 </DD>
662 <DD><DL>
663 <DT><B>Parameters:</B><DD><CODE>stacks</CODE> - The list containing String[] elements<DT><B>Since:</B></DT>
664 <DD>2.0</DD>
665 </DL>
666 </DD>
667 </DL>
668 <!-- ========= END OF CLASS DATA ========= -->
669 <HR>
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="">
676 <TR>
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>&nbsp;</TD>
682 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
683 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
684 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NestableDelegate.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
685 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
686 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
687 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
688 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
689 </TR>
690 </TABLE>
691 </TD>
692 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
693 </EM>
694 </TD>
695 </TR>
697 <TR>
698 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
699 &nbsp;<A HREF="../../../../../org/apache/commons/lang/exception/ExceptionUtils.html" title="class in org.apache.commons.lang.exception"><B>PREV CLASS</B></A>&nbsp;
700 &nbsp;NEXT CLASS</FONT></TD>
701 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
702 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
703 &nbsp;<A HREF="NestableDelegate.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
704 &nbsp;<SCRIPT type="text/javascript">
705 <!--
706 if(window==top) {
707 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
709 //-->
710 </SCRIPT>
711 <NOSCRIPT>
712 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
713 </NOSCRIPT>
715 </FONT></TD>
716 </TR>
717 <TR>
718 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
719 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
720 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
721 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
722 </TR>
723 </TABLE>
724 <A NAME="skip-navbar_bottom"></A>
725 <!-- ======== END OF BOTTOM NAVBAR ======= -->
727 <HR>
728 Copyright © 2001-2008 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
729 </BODY>
730 </HTML>