Change scope of methods from package to public
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137366 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8f45918465
commit
c09f7744fb
|
@ -55,6 +55,7 @@ package org.apache.commons.lang.exception;
|
||||||
|
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
@ -74,9 +75,9 @@ import java.util.*;
|
||||||
* @author Sean C. Sullivan
|
* @author Sean C. Sullivan
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version $Id: NestableDelegate.java,v 1.13 2003/05/14 02:59:13 bayard Exp $
|
* @version $Id: NestableDelegate.java,v 1.14 2003/06/10 06:16:54 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class NestableDelegate implements java.io.Serializable {
|
public class NestableDelegate implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor error message.
|
* Constructor error message.
|
||||||
|
@ -109,7 +110,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
* @param nestable the Nestable implementation (<i>must</i> extend
|
* @param nestable the Nestable implementation (<i>must</i> extend
|
||||||
* {@link java.lang.Throwable})
|
* {@link java.lang.Throwable})
|
||||||
*/
|
*/
|
||||||
NestableDelegate(Nestable nestable) {
|
public NestableDelegate(Nestable nestable) {
|
||||||
if (nestable instanceof Throwable) {
|
if (nestable instanceof Throwable) {
|
||||||
this.nestable = (Throwable) nestable;
|
this.nestable = (Throwable) nestable;
|
||||||
} else {
|
} else {
|
||||||
|
@ -129,7 +130,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
* negative or not less than the count of <code>Throwable</code>s in the
|
* negative or not less than the count of <code>Throwable</code>s in the
|
||||||
* chain
|
* chain
|
||||||
*/
|
*/
|
||||||
String getMessage(int index) {
|
public String getMessage(int index) {
|
||||||
Throwable t = this.getThrowable(index);
|
Throwable t = this.getThrowable(index);
|
||||||
if (Nestable.class.isInstance(t)) {
|
if (Nestable.class.isInstance(t)) {
|
||||||
return ((Nestable) t).getMessage(0);
|
return ((Nestable) t).getMessage(0);
|
||||||
|
@ -150,7 +151,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
* @return The concatenated message for this and all nested
|
* @return The concatenated message for this and all nested
|
||||||
* <code>Throwable</code>s
|
* <code>Throwable</code>s
|
||||||
*/
|
*/
|
||||||
String getMessage(String baseMsg) {
|
public String getMessage(String baseMsg) {
|
||||||
StringBuffer msg = new StringBuffer();
|
StringBuffer msg = new StringBuffer();
|
||||||
if (baseMsg != null) {
|
if (baseMsg != null) {
|
||||||
msg.append(baseMsg);
|
msg.append(baseMsg);
|
||||||
|
@ -180,7 +181,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
*
|
*
|
||||||
* @return the error messages
|
* @return the error messages
|
||||||
*/
|
*/
|
||||||
String[] getMessages() {
|
public String[] getMessages() {
|
||||||
Throwable[] throwables = this.getThrowables();
|
Throwable[] throwables = this.getThrowables();
|
||||||
String[] msgs = new String[throwables.length];
|
String[] msgs = new String[throwables.length];
|
||||||
for (int i = 0; i < throwables.length; i++) {
|
for (int i = 0; i < throwables.length; i++) {
|
||||||
|
@ -203,7 +204,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
* negative or not less than the count of <code>Throwable</code>s in the
|
* negative or not less than the count of <code>Throwable</code>s in the
|
||||||
* chain
|
* chain
|
||||||
*/
|
*/
|
||||||
Throwable getThrowable(int index) {
|
public Throwable getThrowable(int index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return this.nestable;
|
return this.nestable;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +218,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
*
|
*
|
||||||
* @return the throwable count
|
* @return the throwable count
|
||||||
*/
|
*/
|
||||||
int getThrowableCount() {
|
public int getThrowableCount() {
|
||||||
return ExceptionUtils.getThrowableCount(this.nestable);
|
return ExceptionUtils.getThrowableCount(this.nestable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +229,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
*
|
*
|
||||||
* @return the <code>Throwable</code>s
|
* @return the <code>Throwable</code>s
|
||||||
*/
|
*/
|
||||||
Throwable[] getThrowables() {
|
public Throwable[] getThrowables() {
|
||||||
return ExceptionUtils.getThrowables(this.nestable);
|
return ExceptionUtils.getThrowables(this.nestable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +248,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
* is negative or not less than the count of <code>Throwable</code>s in the
|
* is negative or not less than the count of <code>Throwable</code>s in the
|
||||||
* chain
|
* chain
|
||||||
*/
|
*/
|
||||||
int indexOfThrowable(Class type, int fromIndex) {
|
public int indexOfThrowable(Class type, int fromIndex) {
|
||||||
return ExceptionUtils.indexOfThrowable(this.nestable, type, fromIndex);
|
return ExceptionUtils.indexOfThrowable(this.nestable, type, fromIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +337,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
* @param t The <code>Throwable</code>.
|
* @param t The <code>Throwable</code>.
|
||||||
* @return An array of strings describing each stack frame.
|
* @return An array of strings describing each stack frame.
|
||||||
*/
|
*/
|
||||||
private String[] getStackFrames(Throwable t) {
|
protected String[] getStackFrames(Throwable t) {
|
||||||
StringWriter sw = new StringWriter();
|
StringWriter sw = new StringWriter();
|
||||||
PrintWriter pw = new PrintWriter(sw, true);
|
PrintWriter pw = new PrintWriter(sw, true);
|
||||||
|
|
||||||
|
@ -356,7 +357,7 @@ public class NestableDelegate implements java.io.Serializable {
|
||||||
*
|
*
|
||||||
* @param stacks The list containing String[] elements
|
* @param stacks The list containing String[] elements
|
||||||
*/
|
*/
|
||||||
private void trimStackFrames(List stacks) {
|
protected void trimStackFrames(List stacks) {
|
||||||
for (int size=stacks.size(), i=size-1; i > 0; i--) {
|
for (int size=stacks.size(), i=size-1; i > 0; i--) {
|
||||||
String[] curr = (String[]) stacks.get(i);
|
String[] curr = (String[]) stacks.get(i);
|
||||||
String[] next = (String[]) stacks.get(i-1);
|
String[] next = (String[]) stacks.get(i-1);
|
||||||
|
|
Loading…
Reference in New Issue