diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-26 00:02:46 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-26 00:02:46 +0000 |
commit | 8c2da632e20cef7735985bd72c72f68419e788e4 (patch) | |
tree | 03d5d14d8cb5aaa89fa2c9b01eb2689c9e89dc6e /sca-java-2.x/trunk/modules/implementation-java-runtime/src/main | |
parent | 91e796407efd625e37853545415ddcd44acb0fdc (diff) |
Improve property type introspections
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@958152 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java-runtime/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java index 99a8b6d3d7..16de5bbefb 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java @@ -29,7 +29,6 @@ import org.apache.tuscany.sca.implementation.java.JavaImplementation; import org.apache.tuscany.sca.implementation.java.introspect.BaseJavaClassVisitor; import org.apache.tuscany.sca.implementation.java.introspect.JavaIntrospectionHelper; import org.apache.tuscany.sca.interfacedef.DataType; -import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; import org.apache.tuscany.sca.interfacedef.util.JavaXMLMapper; import org.apache.tuscany.sca.interfacedef.util.XMLType; @@ -53,12 +52,10 @@ public class PropertyDataTypeProcessor extends BaseJavaClassVisitor { * @param javaElement * @return */ - private DataType<?> introspect(Property property, JavaElementImpl javaElement) { - XMLType xmlType = new XMLType(property.getXSDElement(), property.getXSDType()); - DataType<XMLType> dt = - new DataTypeImpl<XMLType>(null, javaElement.getType(), javaElement.getGenericType(), xmlType); - mediator.getDataBindings().introspectType(dt, null); - return dt; + private void introspect(Property property, JavaElementImpl javaElement) { + // XMLType xmlType = new XMLType(property.getXSDElement(), property.getXSDType()); + // property.getDataType().setLogical(xmlType); + mediator.getDataBindings().introspectType(property.getDataType(), null); } @Override @@ -66,8 +63,8 @@ public class PropertyDataTypeProcessor extends BaseJavaClassVisitor { for (Property property : type.getProperties()) { String name = property.getName(); JavaElementImpl element = type.getPropertyMembers().get(name); - DataType dt = introspect(property, element); - property.setDataType(dt); + introspect(property, element); + DataType dt = property.getDataType(); if (dt.getLogical() instanceof XMLType) { XMLType xmlType = (XMLType)dt.getLogical(); property.setXSDType(xmlType.getTypeName()); |