comparison org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/conversion/ObjectToStringConverter.d @ 88:9e0ab372d5d8

Revert from TypeInfo/ClassInfo to java.lang.Class
author Frank Benoit <benoit@tionex.de>
date Sun, 19 Apr 2009 11:10:09 +0200
parents 6be48cf9f95c
children
comparison
equal deleted inserted replaced
87:8594250b1d1c 88:9e0ab372d5d8
17 17
18 /** 18 /**
19 * Converts any object to a string by calling its toString() method. 19 * Converts any object to a string by calling its toString() method.
20 */ 20 */
21 public class ObjectToStringConverter : IConverter { 21 public class ObjectToStringConverter : IConverter {
22 private final TypeInfo fromClass; 22 private final Class fromClass;
23 23
24 /** 24 /**
25 * 25 *
26 */ 26 */
27 public this() { 27 public this() {
28 this(typeid(Object)); 28 this(Class.fromType!(Object));
29 } 29 }
30 30
31 /** 31 /**
32 * @param fromClass 32 * @param fromClass
33 */ 33 */
34 public this(TypeInfo fromClass) { 34 public this(Class fromClass) {
35 this.fromClass = fromClass; 35 this.fromClass = fromClass;
36 } 36 }
37 37
38 /* 38 /*
39 * (non-Javadoc) 39 * (non-Javadoc)
50 public Object getFromType() { 50 public Object getFromType() {
51 return fromClass; 51 return fromClass;
52 } 52 }
53 53
54 public Object getToType() { 54 public Object getToType() {
55 return typeid(StringCls); 55 return Class.fromType!(StringCls);
56 } 56 }
57 57
58 } 58 }