stevedlawrence commented on a change in pull request #273: WIP: Add User
Defined Functions Capability
URL: https://github.com/apache/incubator-daffodil/pull/273#discussion_r331198640
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/NodeInfo.scala
##########
@@ -210,6 +210,25 @@ object NodeInfo extends Enum {
}
}
+ def fromClassTypeName(a: String) = {
+ a match {
+ // TODO figure out better solution
Review comment:
The alternative would be to create vals based on classOf, and then match on
those vals, e.g.
```scala
val ClassJavaString = classOf[java.lang.String]
...
def fromClassType(c: Class) = {
c match {
case ClassJavaString => NodeInfo.String
}
}
```
This feels more "right" to me just because having strings of class names
feels odd. Functionally, either should work fine, and this is probably actually
a little easier to read.
----------------------------------------------------------------
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