[x3d-public] X3DJSAIL with Dragome

John Carlson yottzumm at gmail.com
Thu Jun 1 23:39:27 PDT 2017

Okay I got it to compile with the following change to the stylesheet:

diff --git a/src/main/xslt/CreateX3dSceneAccessInterfaceJava.xslt b/src/main/xslt/CreateX3dSceneAccessInterfaceJava.xslt
index 645d2a2..17b5297 100644
--- a/src/main/xslt/CreateX3dSceneAccessInterfaceJava.xslt
+++ b/src/main/xslt/CreateX3dSceneAccessInterfaceJava.xslt
@@ -337,7 +337,7 @@ Additional references of interest:
                        <xsl:when test="($x3dType = 'MFString')">
                                        <xsl:when test="($javadoc='false')">
-                                               <xsl:text disable-output-escaping="yes">new ArrayList<>(Arrays.asList(</xsl:text><!-- ArrayList<> -->
+                                               <xsl:text disable-output-escaping="yes">new ArrayList<String>(Arrays.<String>asList(</xsl:text><!-- ArrayList<> -->^M
                                                <xsl:text>new String[] {</xsl:text>

This results in a line like:

        public static final ArrayList<String> INFO_DEFAULT_VALUE = new ArrayList<String>(Arrays.<String>asList());

Please be sure to test!


Sent from Mail for Windows 10

From: John Carlson
Sent: Friday, June 2, 2017 2:35 AM
To: X3D Graphics public mailing list; Don Brutzman
Subject: X3DJSAIL with Dragome

I decided to try Dragome since it offers Java bytecode translation JavaScript with reflection.  After creating an archetype, I added Saxon to the classpath.  I got the attached errors when compiling.  If these could be fixed, that would be great!  Working on it myself.  If we can fix these errors, then perhaps I don’t need to change X3DObject…

The line seems to be something like:

        public static final ArrayList<String> INFO_DEFAULT_VALUE = new ArrayList<>(Arrays.asList());

The error appears to be:

incompatible types: java.util.ArrayList<java.lang.Object> cannot be converted to java.util.ArrayList<java.lang.String>

In all cases.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170602/1a07e2e3/attachment-0001.html>

More information about the x3d-public mailing list