Revision 1003
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/impl/DefaultDataTypesManager.java | ||
---|---|---|
47 | 47 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToFloat; |
48 | 48 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToInt; |
49 | 49 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToLong; |
50 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToObject; |
|
50 | 51 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToString; |
51 | 52 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToTime; |
52 | 53 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToTimestamp; |
... | ... | |
95 | 96 |
this.addtype(SET, null, "Set", Set.class, null); |
96 | 97 |
this.addtype(MAP, null, "Map", Map.class, null); |
97 | 98 |
|
98 |
this.addtype(OBJECT, null, "Object", null, null);
|
|
99 |
this.addtype(OBJECT, null, "Object", Object.class, new CoerceToObject());
|
|
99 | 100 |
} |
100 | 101 |
|
101 | 102 |
public synchronized int addtype(int type, String subtype, String name, |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/impl/coercion/CoerceToObject.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 2 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.tools.dataTypes.impl.coercion; |
|
24 |
|
|
25 |
import java.util.Locale; |
|
26 |
|
|
27 |
import org.gvsig.tools.dataTypes.CoercionException; |
|
28 |
import org.gvsig.tools.dataTypes.DataTypesManager.CoercionWithLocale; |
|
29 |
|
|
30 |
public class CoerceToObject implements CoercionWithLocale { |
|
31 |
|
|
32 |
public Object coerce(Object value) throws CoercionException { |
|
33 |
return value; |
|
34 |
} |
|
35 |
|
|
36 |
public Object coerce(Object value, Locale locale) throws CoercionException { |
|
37 |
return value; |
|
38 |
} |
|
39 |
|
|
40 |
} |
|
0 | 41 |
Also available in: Unified diff