1 30 31 package de.susebox.java.lang; 32 33 import java.lang.NullPointerException ; 37 38 39 43 50 public class ExtNullPointerException extends NullPointerException implements ThrowableList { 51 52 56 63 public Throwable getCause() { 64 return _next; 65 } 66 67 74 public Throwable nextThrowable() { 75 return getCause(); 76 } 77 78 85 public boolean isWrapper() { 86 return _isWrapper; 87 } 88 89 96 public String getFormat() { 97 return super.getMessage(); 98 } 99 100 107 public Object [] getArguments() { 108 return _args; 109 } 110 111 112 116 123 public ExtNullPointerException(String msg) { 124 this(null, msg, null); 125 } 126 127 141 public ExtNullPointerException(Throwable ex) { 142 this(ex, null, null); 143 } 144 145 161 public ExtNullPointerException(Throwable ex, String msg) { 162 this(ex, msg, null); 163 } 164 165 180 public ExtNullPointerException(String fmt, Object [] args) { 181 this(null, fmt, args); 182 } 183 184 195 public ExtNullPointerException(Throwable ex, String fmt, Object [] args) { 196 super(fmt); 197 198 if (ex != null && fmt == null) { 199 _isWrapper = true; 200 } else { 201 _isWrapper = false; 202 } 203 _next = ex; 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 |