mbeckerle commented on code in PR #1158:
URL: https://github.com/apache/daffodil/pull/1158#discussion_r1489578223
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/api/DFDLPrimTypeEnum.java:
##########
@@ -14,16 +14,31 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.apache.daffodil.runtime1.api;
-package org.apache.daffodil.runtime1.dpath
-
-import org.junit.Assert.assertTrue
-import org.junit.Test
-
-class TestNodeInfo {
-
- @Test def test_nodeInfoCanBeConstructed(): Unit = {
- assertTrue(NodeInfo.isXDerivedFromY("Byte", "Long"))
- }
+/**
+ * An enumeration of all DFDL's simple types.
+ */
+public enum DFDLPrimTypeEnum {
Review Comment:
I am disinclined to all-caps enum names that come from Java enum
definitions. It will make them very ugly to use in Scala code. It's never been
a convention I liked. Honestly, I think it's a holdover from C days of early
computing when ALL CAPS NAMES were a way of shouting that you did get the point
that you shouldn't hard-code magic numbers in your code. But it wasn't
necessary even then when we didn't have fancy IDEs that would take you to the
definition in one click.
The suffix "Enum" was intended to make clear that "this is just an enum",
but I think I will remove it, as Java enums are classes and can have methods
and other richness, which we may want to add at some point.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]