1 30 31 package de.susebox.java.lang; 32 33 import java.lang.NoSuchMethodException ; 37 38 39 43 49 public class ExtNoSuchMethodException extends NoSuchMethodException implements ThrowableList 50 { 51 55 62 public Throwable getCause() { 63 return _next; 64 } 65 66 73 public Throwable nextThrowable() { 74 return getCause(); 75 } 76 77 84 public boolean isWrapper() { 85 return _isWrapper; 86 } 87 88 95 public String getFormat() { 96 return super.getMessage(); 97 } 98 99 106 public Object [] getArguments() { 107 return _args; 108 } 109 110 111 115 122 public ExtNoSuchMethodException(String msg) { 123 this(null, msg, null); 124 } 125 126 140 public ExtNoSuchMethodException(Throwable trowable) { 141 this(trowable, null, null); 142 } 143 144 160 public ExtNoSuchMethodException(Throwable throwable, String msg) { 161 this(throwable, msg, null); 162 } 163 164 179 public ExtNoSuchMethodException(String fmt, Object [] args) { 180 this(null, fmt, args); 181 } 182 183 195 public ExtNoSuchMethodException(Throwable throwable, String fmt, Object [] args) { 196 super(fmt); 197 198 if (throwable != null && fmt == null) { 199 _isWrapper = true; 200 } else { 201 _isWrapper = false; 202 } 203 _next = throwable; 204 _args = args; 205 } 206 207 208 212 220 public String getMessage() { 221 return ThrowableMessageFormatter.getMessage(this); 222 } 223 224 228 231 protected Object [] _args = null; 232 233 236 protected Throwable _next = null; 237 238 243 protected boolean _isWrapper = false; 244 } 245 | Popular Tags |