bsloane1650 commented on a change in pull request #264: WIP - DAFFODIL-2169
URL: https://github.com/apache/incubator-daffodil/pull/264#discussion_r307051888
 
 

 ##########
 File path: daffodil-lib/src/main/scala/org/apache/daffodil/util/DataValue.scala
 ##########
 @@ -0,0 +1,91 @@
+package org.apache.daffodil.infoset
+
+import java.lang.{ Boolean => JBoolean, Number => JNumber, Long => JLong, 
Double => JDouble, String => JString, Float => JFloat, Byte => JByte, Integer 
=> JInt, Short => JShort }
+import java.math.{ BigDecimal => JBigDecimal, BigInteger => JBigInt }
+import org.apache.daffodil.calendar.DFDLCalendar
+
+/*
+ * DINode is not visible to Daffodil-lib, so we cannot actually reference this 
here.
+ * We are trusting the rest of the codebase to only apply DataValueDINode to 
the DINode
+ * class.
+ * The DINode class itself defines an implicit DataValueDINode -> DINode 
conversion
 
 Review comment:
   I believe I was looking at our Numbers.scala file, which currently is 
defined in terms of AnyRef. I believe our only use of it is for objects that 
are DataValue; so I wanted to try include that in the code that is DataValue 
aware. Particuarly the as_ methods.
   
   I suppose we could move these methods to DataValue itself. The issue there 
is that we need to distinguish between the accesors that just do an 
.asInstanceOf, and those that dispatch on the type and potentially do a runtime 
conversion.
   
   I can try doing that, then hopefully remove most of what is in Numbers.scala.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to