You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2021/02/18 00:05:51 UTC

[royale-compiler] branch develop updated (b850dd3 -> daad508)

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from b850dd3  playerglobal-source-gen: Ant build.xml for .jar file
     new bfcf2c1  playerglobal-source-gen: build tweaks
     new 6e96c07  playerglobal-source-gen: better string detection on default parameter values
     new c129d76  playerglobal-source-gen: more build tweaks
     new daad508  build: add playerglobal-source-gen

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.xml                                          |   8 +-
 playerglobal-source-gen/build.xml                  |   4 +-
 playerglobal-source-gen/pom.xml                    |   6 +-
 .../royale/playerglobal/PlayerglobalSourceGen.java | 300 ++++++++++-----------
 4 files changed, 159 insertions(+), 159 deletions(-)


[royale-compiler] 04/04: build: add playerglobal-source-gen

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit daad508070f6bbccb7c5fad3e7bf1a015e6201af
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Feb 17 15:12:32 2021 -0800

    build: add playerglobal-source-gen
---
 build.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 7f47fe1..9831d89 100644
--- a/build.xml
+++ b/build.xml
@@ -70,9 +70,13 @@
 
     <target name="swf" depends="sdk, javadoc, tests" description="Builds SWF compiler, builds Royale Javadoc, and runs SWF compiler tests."/>
 
-    <target name="main" depends="swf, jx, oem, debugger, anttasks, royaleunit.anttasks" description="Builds Royale SWF compiler, then Royale JS Transpiler"/>
+    <target name="main" depends="swf, jx, oem, debugger, anttasks, royaleunit.anttasks, playerglobal-source-gen" description="Builds Royale SWF compiler, then Royale JS Transpiler"/>
 
     <target name="jx" depends="compiler.jx, compiler.jx.tests" description="Builds Royale JS Transpiler" />
+
+    <target name="playerglobal-source-gen" depends="compiler.jx">
+        <ant dir="playerglobal-source-gen" />
+    </target>
     
     <target name="oem" depends="compiler.oem" description="Builds FB Integration JAR" />
 
@@ -140,6 +144,7 @@
         <ant dir="royale-ant-tasks" target="clean"/>
         <ant dir="royaleunit-ant-tasks" target="clean"/>
         <ant dir="debugger" target="clean"/>
+        <ant dir="playerglobal-source-gen" target="clean"/>
     </target>
 
     <target name="wipe" description="Wipes out everything that didn't come from Git.">
@@ -167,6 +172,7 @@
         <ant dir="royale-ant-tasks" target="wipe"/>
         <ant dir="royaleunit-ant-tasks" target="wipe"/>
         <ant dir="debugger" target="clean"/>
+        <ant dir="playerglobal-source-gen" target="wipe"/>
         <delete dir="${basedir}/out" failonerror="false" includeEmptyDirs="true"/>
         <delete dir="${basedir}/temp" failonerror="false" includeEmptyDirs="true"/>
         <!-- remove legacy folders if they exist -->


[royale-compiler] 03/04: playerglobal-source-gen: more build tweaks

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit c129d766df339ce18a83f19565db6b08705e7b69
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Feb 17 15:11:13 2021 -0800

    playerglobal-source-gen: more build tweaks
---
 playerglobal-source-gen/pom.xml                                  | 2 +-
 .../org/apache/royale/playerglobal/PlayerglobalSourceGen.java    | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/playerglobal-source-gen/pom.xml b/playerglobal-source-gen/pom.xml
index aa3ec9d..2f7825d 100644
--- a/playerglobal-source-gen/pom.xml
+++ b/playerglobal-source-gen/pom.xml
@@ -80,7 +80,7 @@
     <dependency>
       <groupId>org.dom4j</groupId>
       <artifactId>dom4j</artifactId>
-      <version>2.1.3</version>
+      <version>1.6.1</version>
     </dependency>
   </dependencies>
 
diff --git a/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java b/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
index 9a95dee..8b0aa7a 100644
--- a/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
+++ b/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
@@ -166,13 +166,16 @@ class PlayerglobalSourceGen {
 	}
 
 	private void parsePackage(Element apiPackageElement) throws Exception {
-		for (Element apiOperationElement : apiPackageElement.elements("apiOperation")) {
+		List<Element> apiOperationElements = apiPackageElement.elements("apiOperation");
+		for (Element apiOperationElement : apiOperationElements) {
 			parsePackageFunction(apiOperationElement);
 		}
-		for (Element apiValueElement : apiPackageElement.elements("apiValue")) {
+		List<Element> apiValueElements = apiPackageElement.elements("apiValue");
+		for (Element apiValueElement : apiValueElements) {
 			parsePackageVariable(apiValueElement);
 		}
-		for (Element apiClassifierElement : apiPackageElement.elements("apiClassifier")) {
+		List<Element> apiClassifierElements = apiPackageElement.elements("apiClassifier");
+		for (Element apiClassifierElement : apiClassifierElements) {
 			Element apiClassifierDetailElement = apiClassifierElement.element("apiClassifierDetail");
 			if (apiClassifierDetailElement == null) {
 				String fullyQualifiedName = apiClassifierElement.attributeValue("id");


[royale-compiler] 02/04: playerglobal-source-gen: better string detection on default parameter values

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 6e96c07ae38c76f633e82c15bdbf31749dfe4562
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Feb 17 14:45:50 2021 -0800

    playerglobal-source-gen: better string detection on default parameter values
---
 .../java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java b/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
index dc0201a..9a95dee 100644
--- a/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
+++ b/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
@@ -859,8 +859,9 @@ class PlayerglobalSourceGen {
 		if ("unknown".equals(paramValue)) {
 			paramValue = "null";
 		}
-		boolean isString = ("String".equals(varType) || paramValue.matches("[A-Za-z]+")) && !"null".equals(paramValue)
-				&& !"NaN".equals(paramValue) && !"true".equals(paramValue) && !"false".equals(paramValue);
+		boolean isString = ("String".equals(varType) || paramValue.matches("[A-Za-z\\*]+"))
+				&& !"undefined".equals(paramValue) && !"null".equals(paramValue) && !"NaN".equals(paramValue)
+				&& !"true".equals(paramValue) && !"false".equals(paramValue);
 		if (isString) {
 			builder.append("\"");
 		}


[royale-compiler] 01/04: playerglobal-source-gen: build tweaks

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit bfcf2c18bca92eac10a45360df6f470765447382
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Feb 17 14:45:07 2021 -0800

    playerglobal-source-gen: build tweaks
---
 playerglobal-source-gen/build.xml                  |   4 +-
 playerglobal-source-gen/pom.xml                    |   4 +-
 .../royale/playerglobal/PlayerglobalSourceGen.java | 286 ++++++++++-----------
 3 files changed, 142 insertions(+), 152 deletions(-)

diff --git a/playerglobal-source-gen/build.xml b/playerglobal-source-gen/build.xml
index 4230ad7..cdded40 100644
--- a/playerglobal-source-gen/build.xml
+++ b/playerglobal-source-gen/build.xml
@@ -79,8 +79,8 @@
             <src path="${playerglobal-source-gen}/src/main/java"/>
             <classpath>
                 <pathelement location="${playerglobal-source-gen}/target/classes"/>
-                <fileset dir="${playerglobal-source-gen}/../compiler-jx/lib/google" includes="**/*.jar"/>
-                <fileset dir="${playerglobal-source-gen}/../compiler/lib" includes="compiler-common.jar,external/flex-tool-api.jar"/>
+                <fileset dir="${playerglobal-source-gen}/../compiler-jx/lib" includes="dom4j.jar"/>
+                <fileset dir="${playerglobal-source-gen}/../compiler/lib/external" includes="commons-io.jar"/>
             </classpath>
         </javac>
     </target>
diff --git a/playerglobal-source-gen/pom.xml b/playerglobal-source-gen/pom.xml
index 0dc5648..aa3ec9d 100644
--- a/playerglobal-source-gen/pom.xml
+++ b/playerglobal-source-gen/pom.xml
@@ -34,8 +34,8 @@
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.8.1</version>
         <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
+          <source>1.6</source>
+          <target>1.6</target>
         </configuration>
       </plugin>
       <plugin>
diff --git a/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java b/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
index 569fd06..dc0201a 100644
--- a/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
+++ b/playerglobal-source-gen/src/main/java/org/apache/royale/playerglobal/PlayerglobalSourceGen.java
@@ -233,11 +233,11 @@ class PlayerglobalSourceGen {
 		boolean isAIROnly = isAIROnly(apiClassifierElement.element("prolog"));
 		boolean isVector = className.startsWith("Vector$");
 
-		Set<String> importFullyQualifiedNames = new HashSet<>();
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
 		collectImports(apiClassifierElement, packageName, importFullyQualifiedNames);
 
 		String baseClassFullyQualifiedName = "";
-		List<String> interfaceFullyQualifiedNames = new ArrayList<>();
+		List<String> interfaceFullyQualifiedNames = new ArrayList<String>();
 		String access = null;
 		boolean isFinal = false;
 		boolean isDynamic = false;
@@ -364,10 +364,10 @@ class PlayerglobalSourceGen {
 
 		boolean isAIROnly = isAIROnly(apiClassifierElement.element("prolog"));
 
-		Set<String> importFullyQualifiedNames = new HashSet<>();
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
 		collectImports(apiClassifierElement, packageName, importFullyQualifiedNames);
 
-		List<String> interfaceFullyQualifiedNames = new ArrayList<>();
+		List<String> interfaceFullyQualifiedNames = new ArrayList<String>();
 		String access = null;
 
 		Element apiClassifierDetailElement = apiClassifierElement.element("apiClassifierDetail");
@@ -458,7 +458,7 @@ class PlayerglobalSourceGen {
 			fullyQualifiedName = packageName + "." + parts[1];
 		}
 
-		Set<String> importFullyQualifiedNames = new HashSet<>();
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
 		collectImports(apiOperationElement, packageName, importFullyQualifiedNames);
 
 		boolean isAIROnly = isAIROnly(apiOperationElement.element("prolog"));
@@ -504,7 +504,7 @@ class PlayerglobalSourceGen {
 			return;
 		}
 
-		Set<String> importFullyQualifiedNames = new HashSet<>();
+		Set<String> importFullyQualifiedNames = new HashSet<String>();
 		collectImports(apiValueElement, packageName, importFullyQualifiedNames);
 
 		boolean isAIROnly = isAIROnly(apiValueElement.element("prolog"));
@@ -791,32 +791,28 @@ class PlayerglobalSourceGen {
 
 	private String parseReturnOrParamType(Element apiTypeElement, String contextClassName) throws Exception {
 		String apiTypeValue = apiTypeElement.attributeValue("value");
-		switch (apiTypeValue) {
-			case "restParam": {
-				return null;
-			}
-			case "any": {
-				return "*";
-			}
-			case "T": {
-				return "T";
-			}
-			case "void": {
-				return "void";
+		if ("restParam".equals(apiTypeValue)) {
+			return null;
+		}
+		if ("any".equals(apiTypeValue)) {
+			return "*";
+		}
+		if ("T".equals(apiTypeValue)) {
+			return "T";
+		}
+		if ("void".equals(apiTypeValue)) {
+			return "void";
+		}
+		if (apiTypeValue.startsWith("Vector$")) {
+			String[] parts = apiTypeValue.split("\\$");
+			String vectorItemType = parts[1];
+			vectorItemType = vectorItemType.replace(":", ".");
+			if (contextClassName != null && contextClassName.startsWith("Vector$") && vectorItemType.equals("T")) {
+				return contextClassName;
 			}
-			default:
-				if (apiTypeValue.startsWith("Vector$")) {
-					String[] parts = apiTypeValue.split("\\$");
-					String vectorItemType = parts[1];
-					vectorItemType = vectorItemType.replace(":", ".");
-					if (contextClassName != null && contextClassName.startsWith("Vector$")
-							&& vectorItemType.equals("T")) {
-						return contextClassName;
-					}
-					return "Vector.<" + vectorItemType + ">";
-				} else {
-					throw new Exception("Unknown apiType value: " + apiTypeValue);
-				}
+			return "Vector.<" + vectorItemType + ">";
+		} else {
+			throw new Exception("Unknown apiType value: " + apiTypeValue);
 		}
 	}
 
@@ -889,146 +885,140 @@ class PlayerglobalSourceGen {
 	}
 
 	private void collectImports(Element element, String forPackage, Set<String> result) throws Exception {
-		switch (element.getName()) {
-			case "apiClassifier": {
-				String className = element.element("apiName").getTextTrim();
+		String elementName = element.getName();
+		if ("apiClassifier".equals(elementName)) {
+			String className = element.element("apiName").getTextTrim();
 
-				Element apiClassifierDetailElement = element.element("apiClassifierDetail");
-				if (apiClassifierDetailElement == null) {
-					throw new Exception("apiClassifierDetail not found for: " + className);
-				}
-				Element apiClassifierDefElement = apiClassifierDetailElement.element("apiClassifierDef");
-				if (apiClassifierDefElement == null) {
-					throw new Exception("apiClassifierDef not found for: " + className);
-				}
+			Element apiClassifierDetailElement = element.element("apiClassifierDetail");
+			if (apiClassifierDetailElement == null) {
+				throw new Exception("apiClassifierDetail not found for: " + className);
+			}
+			Element apiClassifierDefElement = apiClassifierDetailElement.element("apiClassifierDef");
+			if (apiClassifierDefElement == null) {
+				throw new Exception("apiClassifierDef not found for: " + className);
+			}
 
-				Element apiBaseClassifierElement = apiClassifierDefElement.element("apiBaseClassifier");
-				if (apiBaseClassifierElement != null) {
-					String baseClassType = apiBaseClassifierElement.getTextTrim();
-					collectImport(baseClassType, forPackage, result);
-				}
+			Element apiBaseClassifierElement = apiClassifierDefElement.element("apiBaseClassifier");
+			if (apiBaseClassifierElement != null) {
+				String baseClassType = apiBaseClassifierElement.getTextTrim();
+				collectImport(baseClassType, forPackage, result);
+			}
 
-				List<Element> apiBaseInterfaceElements = apiClassifierDefElement.elements("apiBaseInterface");
-				for (Element apiBaseInterfaceElement : apiBaseInterfaceElements) {
-					String interfaceType = apiBaseInterfaceElement.getTextTrim();
-					collectImport(interfaceType, forPackage, result);
-				}
+			List<Element> apiBaseInterfaceElements = apiClassifierDefElement.elements("apiBaseInterface");
+			for (Element apiBaseInterfaceElement : apiBaseInterfaceElements) {
+				String interfaceType = apiBaseInterfaceElement.getTextTrim();
+				collectImport(interfaceType, forPackage, result);
+			}
 
-				Element apiConstructorElement = element.element("apiConstructor");
-				if (apiConstructorElement != null) {
-					collectImports(apiConstructorElement, forPackage, result);
-				}
+			Element apiConstructorElement = element.element("apiConstructor");
+			if (apiConstructorElement != null) {
+				collectImports(apiConstructorElement, forPackage, result);
+			}
 
-				List<Element> apiOperationElements = element.elements("apiOperation");
-				for (Element apiOperationElement : apiOperationElements) {
-					collectImports(apiOperationElement, forPackage, result);
-				}
+			List<Element> apiOperationElements = element.elements("apiOperation");
+			for (Element apiOperationElement : apiOperationElements) {
+				collectImports(apiOperationElement, forPackage, result);
+			}
 
-				List<Element> apiValueElements = element.elements("apiValue");
-				for (Element apiValueElement : apiValueElements) {
-					collectImports(apiValueElement, forPackage, result);
-				}
+			List<Element> apiValueElements = element.elements("apiValue");
+			for (Element apiValueElement : apiValueElements) {
+				collectImports(apiValueElement, forPackage, result);
+			}
+		}
+		if ("apiOperation".equals(elementName)) {
+			String functionName = element.element("apiName").getTextTrim();
 
-				break;
+			Element apiOperationDetailElement = element.element("apiOperationDetail");
+			if (apiOperationDetailElement == null) {
+				throw new Exception("apiOperationDetail not found for: " + functionName);
+			}
+			Element apiOperationDefElement = apiOperationDetailElement.element("apiOperationDef");
+			if (apiOperationDefElement == null) {
+				throw new Exception("apiOperationDef not found for: " + functionName);
 			}
-			case "apiOperation": {
-				String functionName = element.element("apiName").getTextTrim();
 
-				Element apiOperationDetailElement = element.element("apiOperationDetail");
-				if (apiOperationDetailElement == null) {
-					throw new Exception("apiOperationDetail not found for: " + functionName);
+			Element apiReturnElement = apiOperationDefElement.element("apiReturn");
+			if (apiReturnElement != null) {
+				Element apiTypeElement = apiOperationDefElement.element("apiType");
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if (apiTypeValue.startsWith("Vector$")) {
+						String[] parts = apiTypeValue.split("\\$");
+						String vectorItemType = parts[1];
+						collectImport(vectorItemType, forPackage, result);
+					}
 				}
-				Element apiOperationDefElement = apiOperationDetailElement.element("apiOperationDef");
-				if (apiOperationDefElement == null) {
-					throw new Exception("apiOperationDef not found for: " + functionName);
+				Element apiOperationClassifierElement = apiReturnElement.element("apiOperationClassifier");
+				if (apiOperationClassifierElement != null) {
+					String returnType = apiOperationClassifierElement.getTextTrim();
+					collectImport(returnType, forPackage, result);
 				}
+			}
 
-				Element apiReturnElement = apiOperationDefElement.element("apiReturn");
-				if (apiReturnElement != null) {
-					Element apiTypeElement = apiOperationDefElement.element("apiType");
-					if (apiTypeElement != null) {
-						String apiTypeValue = apiTypeElement.attributeValue("value");
-						if (apiTypeValue.startsWith("Vector$")) {
-							String[] parts = apiTypeValue.split("\\$");
-							String vectorItemType = parts[1];
-							collectImport(vectorItemType, forPackage, result);
-						}
-					}
-					Element apiOperationClassifierElement = apiReturnElement.element("apiOperationClassifier");
-					if (apiOperationClassifierElement != null) {
-						String returnType = apiOperationClassifierElement.getTextTrim();
-						collectImport(returnType, forPackage, result);
+			List<Element> apiParamElements = apiOperationDefElement.elements("apiParam");
+			for (Element apiParamElement : apiParamElements) {
+				Element apiTypeElement = apiParamElement.element("apiType");
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if (apiTypeValue.startsWith("Vector$")) {
+						String[] parts = apiTypeValue.split("\\$");
+						String vectorItemType = parts[1];
+						collectImport(vectorItemType, forPackage, result);
 					}
 				}
-
-				List<Element> apiParamElements = apiOperationDefElement.elements("apiParam");
-				for (Element apiParamElement : apiParamElements) {
-					Element apiTypeElement = apiParamElement.element("apiType");
-					if (apiTypeElement != null) {
-						String apiTypeValue = apiTypeElement.attributeValue("value");
-						if (apiTypeValue.startsWith("Vector$")) {
-							String[] parts = apiTypeValue.split("\\$");
-							String vectorItemType = parts[1];
-							collectImport(vectorItemType, forPackage, result);
-						}
-					}
-					Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
-					if (apiOperationClassifierElement != null) {
-						String paramType = apiOperationClassifierElement.getTextTrim();
-						collectImport(paramType, forPackage, result);
-					}
+				Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
+				if (apiOperationClassifierElement != null) {
+					String paramType = apiOperationClassifierElement.getTextTrim();
+					collectImport(paramType, forPackage, result);
 				}
-				break;
 			}
-			case "apiConstructor": {
-				String functionName = element.element("apiName").getTextTrim();
+		}
+		if ("apiConstructor".equals(elementName)) {
+			String functionName = element.element("apiName").getTextTrim();
 
-				Element aapiConstructorDetailElement = element.element("apiConstructorDetail");
-				if (aapiConstructorDetailElement == null) {
-					throw new Exception("apiConstructor not found for: " + functionName);
-				}
-				Element apiConstructorDefElement = aapiConstructorDetailElement.element("apiConstructorDef");
-				if (apiConstructorDefElement == null) {
-					throw new Exception("apiConstructorDef not found for: " + functionName);
-				}
+			Element aapiConstructorDetailElement = element.element("apiConstructorDetail");
+			if (aapiConstructorDetailElement == null) {
+				throw new Exception("apiConstructor not found for: " + functionName);
+			}
+			Element apiConstructorDefElement = aapiConstructorDetailElement.element("apiConstructorDef");
+			if (apiConstructorDefElement == null) {
+				throw new Exception("apiConstructorDef not found for: " + functionName);
+			}
 
-				List<Element> apiParamElements = apiConstructorDefElement.elements("apiParam");
-				for (Element apiParamElement : apiParamElements) {
-					Element apiTypeElement = apiParamElement.element("apiType");
-					if (apiTypeElement != null) {
-						String apiTypeValue = apiTypeElement.attributeValue("value");
-						if (apiTypeValue.startsWith("Vector$")) {
-							String[] parts = apiTypeValue.split("\\$");
-							String vectorItemType = parts[1];
-							collectImport(vectorItemType, forPackage, result);
-						}
-					}
-					Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
-					if (apiOperationClassifierElement != null) {
-						String paramType = apiOperationClassifierElement.getTextTrim();
-						collectImport(paramType, forPackage, result);
+			List<Element> apiParamElements = apiConstructorDefElement.elements("apiParam");
+			for (Element apiParamElement : apiParamElements) {
+				Element apiTypeElement = apiParamElement.element("apiType");
+				if (apiTypeElement != null) {
+					String apiTypeValue = apiTypeElement.attributeValue("value");
+					if (apiTypeValue.startsWith("Vector$")) {
+						String[] parts = apiTypeValue.split("\\$");
+						String vectorItemType = parts[1];
+						collectImport(vectorItemType, forPackage, result);
 					}
 				}
-				break;
+				Element apiOperationClassifierElement = apiParamElement.element("apiOperationClassifier");
+				if (apiOperationClassifierElement != null) {
+					String paramType = apiOperationClassifierElement.getTextTrim();
+					collectImport(paramType, forPackage, result);
+				}
 			}
-			case "apiValue": {
-				String variableName = element.element("apiName").getTextTrim();
+		}
+		if ("apiValue".equals(elementName)) {
+			String variableName = element.element("apiName").getTextTrim();
 
-				Element apiValueDetailElement = element.element("apiValueDetail");
-				if (apiValueDetailElement == null) {
-					throw new Exception("apiValueDetail not found for: " + variableName);
-				}
-				Element apiValueDefElement = apiValueDetailElement.element("apiValueDef");
-				if (apiValueDefElement == null) {
-					throw new Exception("apiValueDef not found for: " + variableName);
-				}
+			Element apiValueDetailElement = element.element("apiValueDetail");
+			if (apiValueDetailElement == null) {
+				throw new Exception("apiValueDetail not found for: " + variableName);
+			}
+			Element apiValueDefElement = apiValueDetailElement.element("apiValueDef");
+			if (apiValueDefElement == null) {
+				throw new Exception("apiValueDef not found for: " + variableName);
+			}
 
-				Element apiValueClassifierElement = apiValueDefElement.element("apiValueClassifier");
-				if (apiValueClassifierElement != null) {
-					String variableType = apiValueClassifierElement.getTextTrim();
-					collectImport(variableType, forPackage, result);
-				}
-				break;
+			Element apiValueClassifierElement = apiValueDefElement.element("apiValueClassifier");
+			if (apiValueClassifierElement != null) {
+				String variableType = apiValueClassifierElement.getTextTrim();
+				collectImport(variableType, forPackage, result);
 			}
 		}
 	}