1 30 31 package de.susebox.java.util; 32 33 import java.util.NoSuchElementException ; 37 38 import de.susebox.java.lang.ThrowableList; 39 import de.susebox.java.lang.ThrowableMessageFormatter; 40 41 42 46 52 public class ExtNoSuchElementException 53 extends NoSuchElementException 54 implements ThrowableList 55 { 56 60 67 public Throwable getCause() { 68 return _next; 69 } 70 71 78 public Throwable nextThrowable() { 79 return getCause(); 80 } 81 82 89 public boolean isWrapper() { 90 return _isWrapper; 91 } 92 93 100 public String getFormat() { 101 return super.getMessage(); 102 } 103 104 111 public Object [] getArguments() { 112 return _args; 113 } 114 115 116 120 127 public ExtNoSuchElementException(String msg) { 128 this(null, msg, null); 129 } 130 131 145 public ExtNoSuchElementException(Throwable ex) { 146 this(ex, null, null); 147 } 148 149 165 public ExtNoSuchElementException(Throwable ex, String msg) { 166 this(ex, msg, null); 167 } 168 169 184 public ExtNoSuchElementException(String fmt, Object [] args) { 185 this(null, fmt, args); 186 } 187 188 199 public ExtNoSuchElementException(Throwable ex, String fmt, Object [] args) { 200 super(fmt); 201 202 if (ex != null && fmt == null) { 203 _isWrapper = true; 204 } else { 205 _isWrapper = false; 206 } 207 _next = ex; 208 _args = args; 209 } 210 211 212 216 224 public String getMessage() { 225 return ThrowableMessageFormatter.getMessage(this); 226 } 227 228 232 235 protected Object [] _args = null; 236 237 240 protected Throwable _next = null; 241 242 247 protected boolean _isWrapper = false; 248 } 249 | Popular Tags |