Revision 23743
trunk/libraries/libTools/src-test/org/gvsig/tools/exception/BaseExceptionTest.java | ||
---|---|---|
120 | 120 |
|
121 | 121 |
} |
122 | 122 |
|
123 |
/** |
|
124 |
* Test method for |
|
125 |
* {@link org.gvsig.exceptions.ExceptionUtils#insertBlanksAtStart(java.lang.String, int)} |
|
126 |
* . |
|
127 |
*/ |
|
128 | 123 |
public void testInsertBlanksAtStart() { |
129 | 124 |
String src = "test"; |
130 | 125 |
|
trunk/libraries/libTools/src-test/org/gvsig/tools/exception/AllTests.java | ||
---|---|---|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
4 | 4 |
* of the Valencian Gobernment (CIT) |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
*
|
|
10 |
* |
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
*
|
|
15 |
* |
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 | 19 |
* MA 02110-1301, USA. |
20 |
*
|
|
20 |
* |
|
21 | 21 |
*/ |
22 | 22 |
|
23 | 23 |
/* |
... | ... | |
31 | 31 |
public class AllTests { |
32 | 32 |
|
33 | 33 |
public static Test suite() { |
34 |
TestSuite suite = new TestSuite("Test for org.gvsig.exceptions"); |
|
34 |
TestSuite suite = new TestSuite("Test for org.gvsig.tools.exceptions");
|
|
35 | 35 |
//$JUnit-BEGIN$ |
36 | 36 |
suite.addTestSuite(ListBaseExceptionTest.class); |
37 | 37 |
suite.addTestSuite(BaseExceptionTest.class); |
trunk/libraries/libTools/src/org/gvsig/tools/exception/ListBaseException.java | ||
---|---|---|
25 | 25 |
*/ |
26 | 26 |
package org.gvsig.tools.exception; |
27 | 27 |
|
28 |
import java.util.*; |
|
28 |
import java.util.ArrayList; |
|
29 |
import java.util.Collection; |
|
30 |
import java.util.Iterator; |
|
31 |
import java.util.List; |
|
32 |
import java.util.ListIterator; |
|
29 | 33 |
|
30 | 34 |
/** |
31 | 35 |
* @author Equipo de desarrollo de gvSIG |
... | ... | |
213 | 217 |
return msg; |
214 | 218 |
} |
215 | 219 |
|
216 |
/* (non-Javadoc) |
|
217 |
* @see org.gvsig.exceptions.IBaseException#getLocalizedMessage(org.gvsig.exceptions.IExceptionTranslator, int) |
|
218 |
*/ |
|
219 | 220 |
public String getLocalizedMessage(IExceptionTranslator exceptionTranslator, int indent) { |
220 | 221 |
String msg = super.getLocalizedMessage(exceptionTranslator, indent); |
221 | 222 |
Exception bex; |
trunk/libraries/libTools/src/org/gvsig/tools/exception/BaseException.java | ||
---|---|---|
145 | 145 |
return format(this.formatString, values()); |
146 | 146 |
} |
147 | 147 |
|
148 |
/* (non-Javadoc) |
|
149 |
* @see org.gvsig.exceptions.IBaseException#getMessage(int) |
|
150 |
*/ |
|
151 | 148 |
public String getMessage(int indent) { |
152 | 149 |
return insertBlanksAtStart(format(formatString, values()),indent); |
153 | 150 |
} |
154 | 151 |
|
155 |
/* (non-Javadoc) |
|
156 |
* @see java.lang.Throwable#getLocalizedMessage() |
|
157 |
*/ |
|
158 | 152 |
public String getLocalizedMessage() { |
159 | 153 |
return getLocalizedMessage(translator,0); |
160 | 154 |
} |
161 | 155 |
|
162 |
/* (non-Javadoc) |
|
163 |
* @see org.gvsig.exceptions.IBaseException#getLocalizedMessage(org.gvsig.exceptions.IExceptionTranslator, int) |
|
164 |
*/ |
|
165 | 156 |
public String getLocalizedMessage(IExceptionTranslator translator, int indent){ |
166 | 157 |
|
167 | 158 |
String fmt; |
... | ... | |
181 | 172 |
return insertBlanksAtStart(format(fmt,values()),indent); |
182 | 173 |
} |
183 | 174 |
|
184 |
/* (non-Javadoc) |
|
185 |
* @see org.gvsig.exceptions.IBaseException#getMessageStack() |
|
186 |
*/ |
|
187 | 175 |
public String getMessageStack() { |
188 | 176 |
return getMessageStack(0); |
189 | 177 |
} |
190 | 178 |
|
191 |
/* (non-Javadoc) |
|
192 |
* @see org.gvsig.exceptions.IBaseException#getMessageStack(int) |
|
193 |
*/ |
|
194 | 179 |
public String getMessageStack(int indent) { |
195 | 180 |
Iterator iter = this.iterator(); |
196 | 181 |
StringBuffer msgBuffer = new StringBuffer(); |
... | ... | |
216 | 201 |
} |
217 | 202 |
|
218 | 203 |
|
219 |
/* (non-Javadoc) |
|
220 |
* @see org.gvsig.exceptions.IBaseException#getLocalizedMessageStack() |
|
221 |
*/ |
|
222 | 204 |
public String getLocalizedMessageStack() { |
223 | 205 |
return getLocalizedMessageStack(BaseException.translator,0); |
224 | 206 |
} |
225 | 207 |
|
226 |
/* (non-Javadoc) |
|
227 |
* @see org.gvsig.exceptions.IBaseException#getLocalizedMessageStack(org.gvsig.exceptions.IExceptionTranslator, int) |
|
228 |
*/ |
|
229 | 208 |
public String getLocalizedMessageStack(IExceptionTranslator translator, int indent) { |
230 | 209 |
Iterator iter = this.iterator(); |
231 | 210 |
StringBuffer msgBuffer = new StringBuffer(); |
... | ... | |
261 | 240 |
return BLANKS.substring(0, blanksLen) + str; |
262 | 241 |
} |
263 | 242 |
|
264 |
/* (non-Javadoc) |
|
265 |
* @see org.gvsig.exceptions.IBaseException#getCode() |
|
266 |
*/ |
|
267 | 243 |
public long getCode() { |
268 | 244 |
return this.code; |
269 | 245 |
} |
... | ... | |
275 | 251 |
this.code = code; |
276 | 252 |
} |
277 | 253 |
|
278 |
/* (non-Javadoc) |
|
279 |
* @see org.gvsig.exceptions.IBaseException#getFormatString() |
|
280 |
*/ |
|
281 | 254 |
public String getFormatString() { |
282 | 255 |
return this.formatString; |
283 | 256 |
} |
... | ... | |
291 | 264 |
this.formatString = formatString; |
292 | 265 |
} |
293 | 266 |
|
294 |
/* (non-Javadoc) |
|
295 |
* @see org.gvsig.exceptions.IBaseException#getMessageKey() |
|
296 |
*/ |
|
297 | 267 |
public String getMessageKey() { |
298 | 268 |
return this.messageKey; |
299 | 269 |
} |
... | ... | |
307 | 277 |
this.messageKey = messageKey; |
308 | 278 |
} |
309 | 279 |
|
310 |
/* (non-Javadoc) |
|
311 |
* @see org.gvsig.exceptions.IBaseException#iterator() |
|
312 |
*/ |
|
313 | 280 |
public Iterator iterator() { |
314 | 281 |
return new BaseExceptionIterator(this); |
315 | 282 |
} |
trunk/libraries/libTools/src/org/gvsig/tools/visitor/NotSupportedOperationException.java | ||
---|---|---|
54 | 54 |
code = serialVersionUID; |
55 | 55 |
} |
56 | 56 |
|
57 |
/* |
|
58 |
* (non-Javadoc) |
|
59 |
* @see org.gvsig.exceptions.BaseException#values() |
|
60 |
*/ |
|
61 | 57 |
protected Map values() { |
62 | 58 |
HashMap map = new HashMap(); |
63 | 59 |
map.put("visitorClassName", visitorClassName); |
trunk/libraries/libTools/src/org/gvsig/tools/evaluator/Evaluator.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
public Object evaluate(EvaluatorData data); |
6 | 6 |
|
7 |
public Object getExpression(); |
|
7 |
public String getName(); |
|
8 |
|
|
9 |
public String getDescription(); |
|
10 |
|
|
11 |
public String getCQL(); |
|
8 | 12 |
} |
Also available in: Unified diff