move exportSymbol of the class earlier in the file so other @exports are added to the class export. Otherwise the class export overwrites the object holding the other exports
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
index 9ee555e..4df1a21 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
@@ -27,7 +27,9 @@
import org.apache.flex.compiler.definitions.IFunctionDefinition;
import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
+import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSDocEmitter;
import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
+import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitterTokens;
import org.apache.flex.compiler.internal.codegen.js.utils.DocEmitterUtils;
import org.apache.flex.compiler.internal.codegen.js.utils.EmitterUtils;
import org.apache.flex.compiler.internal.projects.FlexJSProject;
@@ -129,6 +131,28 @@
}
}
+ if (!getEmitter().getModel().isExterns)
+ {
+ JSFlexJSDocEmitter doc = (JSFlexJSDocEmitter) getEmitter()
+ .getDocEmitter();
+ writeNewline();
+ writeNewline();
+ writeNewline();
+ doc.begin();
+ writeNewline(" * Prevent renaming of class. Needed for reflection.");
+ doc.end();
+ write(JSFlexJSEmitterTokens.GOOG_EXPORT_SYMBOL);
+ write(ASEmitterTokens.PAREN_OPEN);
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(getEmitter().formatQualifiedName(node.getQualifiedName()));
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(ASEmitterTokens.COMMA);
+ write(ASEmitterTokens.SPACE);
+ write(getEmitter().formatQualifiedName(node.getQualifiedName()));
+ write(ASEmitterTokens.PAREN_CLOSE);
+ write(ASEmitterTokens.SEMICOLON);
+ }
+
IDefinitionNode[] dnodes = node.getAllMemberNodes();
for (IDefinitionNode dnode : dnodes)
{
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/InterfaceEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/InterfaceEmitter.java
index 626896f..3c15b64 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/InterfaceEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/InterfaceEmitter.java
@@ -26,7 +26,9 @@
import org.apache.flex.compiler.internal.codegen.js.JSDocEmitterTokens;
import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
+import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSDocEmitter;
import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
+import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitterTokens;
import org.apache.flex.compiler.projects.ICompilerProject;
import org.apache.flex.compiler.tree.ASTNodeID;
import org.apache.flex.compiler.tree.as.IAccessorNode;
@@ -70,6 +72,28 @@
write(ASEmitterTokens.SEMICOLON);
}
+ if (!getEmitter().getModel().isExterns)
+ {
+ JSFlexJSDocEmitter doc = (JSFlexJSDocEmitter) getEmitter()
+ .getDocEmitter();
+ writeNewline();
+ writeNewline();
+ writeNewline();
+ doc.begin();
+ writeNewline(" * Prevent renaming of class. Needed for reflection.");
+ doc.end();
+ write(JSFlexJSEmitterTokens.GOOG_EXPORT_SYMBOL);
+ write(ASEmitterTokens.PAREN_OPEN);
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(getEmitter().formatQualifiedName(node.getQualifiedName()));
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(ASEmitterTokens.COMMA);
+ write(ASEmitterTokens.SPACE);
+ write(getEmitter().formatQualifiedName(node.getQualifiedName()));
+ write(ASEmitterTokens.PAREN_CLOSE);
+ write(ASEmitterTokens.SEMICOLON);
+ }
+
final IDefinitionNode[] members = node.getAllMemberDefinitionNodes();
for (IDefinitionNode mnode : members)
{
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageFooterEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageFooterEmitter.java
index abfb297..5952352 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageFooterEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageFooterEmitter.java
@@ -172,29 +172,6 @@
write(ASEmitterTokens.SPACE);
write(ASEmitterTokens.BLOCK_CLOSE);
write(ASEmitterTokens.SEMICOLON);
- // Removed this exclusion to support interface reflection (GD)
- // if (!(tnode instanceof IInterfaceNode))
- // {
- if (!getEmitter().getModel().isExterns)
- {
- writeNewline();
- writeNewline();
- writeNewline();
- doc.begin();
- writeNewline(" * Prevent renaming of class. Needed for reflection.");
- doc.end();
- write(JSFlexJSEmitterTokens.GOOG_EXPORT_SYMBOL);
- write(ASEmitterTokens.PAREN_OPEN);
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(getEmitter().formatQualifiedName(tnode.getQualifiedName()));
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(ASEmitterTokens.COMMA);
- write(ASEmitterTokens.SPACE);
- write(getEmitter().formatQualifiedName(tnode.getQualifiedName()));
- write(ASEmitterTokens.PAREN_CLOSE);
- write(ASEmitterTokens.SEMICOLON);
- }
- // }
collectReflectionData(tnode);
IMetaTagNode[] metadata = null;
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index ab57497..77377c9 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -799,8 +799,25 @@
write(formatQualifiedName(baseClassName));
write(ASEmitterTokens.PAREN_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
+
+ writeNewline();
+ writeNewline();
+ writeNewline("/**");
+ writeNewline(" * Prevent renaming of class. Needed for reflection.");
+ writeNewline(" */");
+ write(JSFlexJSEmitterTokens.GOOG_EXPORT_SYMBOL);
+ write(ASEmitterTokens.PAREN_OPEN);
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(formatQualifiedName(cname));
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(ASEmitterTokens.COMMA);
+ write(ASEmitterTokens.SPACE);
+ write(formatQualifiedName(cname));
+ write(ASEmitterTokens.PAREN_CLOSE);
+ write(ASEmitterTokens.SEMICOLON);
writeNewline();
writeNewline();
+ writeNewline();
}
//--------------------------------------------------------------------------
@@ -834,23 +851,6 @@
}
write(" };");
- writeNewline();
- writeNewline();
- writeNewline();
- writeNewline("/**");
- writeNewline(" * Prevent renaming of class. Needed for reflection.");
- writeNewline(" */");
- write(JSFlexJSEmitterTokens.GOOG_EXPORT_SYMBOL);
- write(ASEmitterTokens.PAREN_OPEN);
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(formatQualifiedName(cname));
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(ASEmitterTokens.COMMA);
- write(ASEmitterTokens.SPACE);
- write(formatQualifiedName(cname));
- write(ASEmitterTokens.PAREN_CLOSE);
- write(ASEmitterTokens.SEMICOLON);
-
emitReflectionData(cdef);
writeNewline();
writeNewline();
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
index cfc0578..4070eb8 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
@@ -37,7 +37,7 @@
IClassNode node = (IClassNode) getNode("function get foo():int{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.get__foo = function() {\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: FalconTest_A.prototype.get__foo}}\n);");
}
@@ -49,7 +49,7 @@
IClassNode node = (IClassNode) getNode("function get foo():int{return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.get__foo = function() {\n return -1;\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: FalconTest_A.prototype.get__foo}}\n);");
}
@@ -61,7 +61,7 @@
IClassNode node = (IClassNode) getNode("public function get foo():int{return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.get__foo = function() {\n return -1;\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: FalconTest_A.prototype.get__foo}}\n);");
}
@@ -73,7 +73,7 @@
IClassNode node = (IClassNode) getNode("public class B extends A { public override function get foo():int{return super.foo;} }; public class A {public function get foo():int {return 0;}} ",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
+ assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n" +
"B.prototype.get__foo = function() {\n return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nget: B.prototype.get__foo}}\n);");
}
@@ -84,7 +84,7 @@
IClassNode node = (IClassNode) getNode("public class B extends A { public override function get foo():int{return super.foo;} }; public class A { public function set foo(value:int):void{} public function get foo():int {return 0;}}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
+ assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n" +
"B.prototype.get__foo = function() {\n return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
}
@@ -96,7 +96,7 @@
IClassNode node = (IClassNode) getNode("public static function get foo():int{return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.get__foo = function() {\n return -1;\n};\n\n\n" +
"Object.defineProperties(FalconTest_A, /** @lends {FalconTest_A} */ {\n/** @export */\nfoo: {\nget: FalconTest_A.get__foo}}\n);");
}
@@ -108,7 +108,7 @@
IClassNode node = (IClassNode) getNode("function set foo(value:int):void{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nset: FalconTest_A.prototype.set__foo}}\n);");
}
@@ -120,7 +120,7 @@
IClassNode node = (IClassNode) getNode("function set foo(value:int):void{fetch('haai');}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.set__foo = function(value) {\n fetch('haai');\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nset: FalconTest_A.prototype.set__foo}}\n);");
}
@@ -132,7 +132,7 @@
IClassNode node = (IClassNode) getNode("public function set foo(value:int):void{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nset: FalconTest_A.prototype.set__foo}}\n);");
}
@@ -144,7 +144,7 @@
IClassNode node = (IClassNode) getNode("public class B extends A { public override function set foo(value:int):void {super.foo = value;} }; public class A { public function set foo(value:int):void{}}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
+ assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n" +
"B.prototype.set__foo = function(value) {\n B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nset: B.prototype.set__foo}}\n);");
}
@@ -156,7 +156,7 @@
IClassNode node = (IClassNode) getNode("public static function set foo(value:int):void{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.set__foo = function(value) {\n};\n\n\n" +
"Object.defineProperties(FalconTest_A, /** @lends {FalconTest_A} */ {\n/** @export */\nfoo: {\nset: FalconTest_A.set__foo}}\n);");
}
@@ -167,7 +167,7 @@
IClassNode node = (IClassNode) getNode("public class B extends A { public override function set foo(value:int):void {super.foo = value;} }; public class A { public function set foo(value:int):void{} public function get foo():int { return 0;}}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
+ assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n" +
"B.prototype.set__foo = function(value) {\n B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
}
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
index 1f88fe4..93a6e09 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
@@ -46,7 +46,7 @@
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
"FalconTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"FalconTest_A.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\n" +
@@ -61,7 +61,7 @@
"public class B { public function B() {}; public function doStuff():void {this.label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n" +
"B.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"B.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nlabel: {\n" +
@@ -76,7 +76,7 @@
"public function doStuff():void {label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
"FalconTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"FalconTest_A.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nlabel: {\n" +
@@ -91,7 +91,7 @@
"public class B { public function B() {}; public function doStuff():void {label = this.label; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n this.label = this.label;\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n this.label = this.label;\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n" +
"B.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"B.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nlabel: {\n" +
@@ -106,7 +106,7 @@
"import flash.utils.flash_proxy;use namespace flash_proxy;public class B { public function B() {}; public function doStuff():void {var theLabel:String = label; label = theLabel;}; private var _label:String; flash_proxy function get label():String {return _label}; flash_proxy function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = this[\"http://www.adobe.com/2006/actionscript/flash/proxy::label\"];\n this[\"http://www.adobe.com/2006/actionscript/flash/proxy::label\"] = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = this[\"http://www.adobe.com/2006/actionscript/flash/proxy::label\"];\n this[\"http://www.adobe.com/2006/actionscript/flash/proxy::label\"] = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n" +
"B.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::get__label\"] = function() {\n return this._label;\n};\n\n\n" +
"B.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::set__label\"] = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\n\"http://www.adobe.com/2006/actionscript/flash/proxy::label\": {\nget: B.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::get__label\"],\nset: B.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::set__label\"]}}\n);";
@@ -120,7 +120,7 @@
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; [Bindable] public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
"FalconTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"FalconTest_A.prototype.bindable__set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"FalconTest_A.prototype.set__label = function(value) {\nvar oldValue = this.get__label();\nif (oldValue != value) {\nthis.bindable__set__label(value);\n" +
@@ -138,7 +138,7 @@
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; [Bindable(\"change\")] public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @export\n */\nFalconTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n" +
"FalconTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"FalconTest_A.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\n" +
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
index 07c8000..fbb1c41 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
@@ -48,7 +48,7 @@
{
IClassNode node = getClassNode("public class A {public function A() { super(); }}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n ;\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n ;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -57,7 +57,7 @@
{
IClassNode node = getClassNode("public class A extends EventDispatcher {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Test
@@ -65,7 +65,7 @@
{
IClassNode node = getClassNode("public class A extends EventDispatcher {public function A(arg:String) { super(arg);}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg\n */\norg.apache.flex.A = function(arg) {\n org.apache.flex.A.base(this, 'constructor', arg);\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg\n */\norg.apache.flex.A = function(arg) {\n org.apache.flex.A.base(this, 'constructor', arg);\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Test
@@ -73,7 +73,7 @@
{
IClassNode node = getClassNode("public class A extends EventDispatcher {public function A(arg:String) {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg\n */\norg.apache.flex.A = function(arg) {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg\n */\norg.apache.flex.A = function(arg) {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -82,7 +82,7 @@
{
IClassNode node = getClassNode("public class A extends EventDispatcher implements IEventDispatcher {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -91,7 +91,7 @@
{
IClassNode node = getClassNode("public class A extends EventDispatcher implements IEventDispatcher, IBitmapDrawable {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -100,7 +100,7 @@
{
IClassNode node = getClassNode("public final class A extends EventDispatcher implements IEventDispatcher, IBitmapDrawable {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -109,7 +109,7 @@
{
IClassNode node = getClassNode("public class A extends flash.events.EventDispatcher implements flash.events.IEventDispatcher, flash.display.IBitmapDrawable {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -118,7 +118,7 @@
{
IClassNode node = getClassNode("public class A extends flash.events.EventDispatcher { public function A() { super('foo', 42);}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor', 'foo', 42);\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor', 'foo', 42);\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Test
@@ -126,7 +126,7 @@
{
IClassNode node = getClassNode("public class B {public function B(arg1:String) {this.arg1 = arg1}; public var arg1:String;}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg.apache.flex.B = function(arg1) {\n this.arg1 = arg1;\n};\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.flex.B.prototype.arg1;";
+ String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg.apache.flex.B = function(arg1) {\n this.arg1 = arg1;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.flex.B.prototype.arg1;";
assertOut(expected);
}
@@ -135,7 +135,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public var event:Event = new Event(); public function foo():String {return event.type;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n\nthis.event = new flash.events.Event();\n};\n\n\n/**\n * @export\n * @type {flash.events.Event}\n */\norg.apache.flex.B.prototype.event;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo = function() {\n return this.event.type;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n\nthis.event = new flash.events.Event();\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @type {flash.events.Event}\n */\norg.apache.flex.B.prototype.event;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo = function() {\n return this.event.type;\n};";
assertOut(expected);
}
@@ -144,7 +144,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -153,7 +153,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -162,7 +162,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo(value:Object):void {baz = ''};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function(value) {\n baz = '';\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function(value) {\n baz = '';\n};";
assertOut(expected);
}
@@ -171,7 +171,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {super.foo();};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n org.apache.flex.B.superClass_.foo.apply(this);\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n org.apache.flex.B.superClass_.foo.apply(this);\n};";
assertOut(expected);
}
@@ -180,7 +180,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function set baz(value:Object):void {}; public function set foo(value:Object):void {baz = value;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\norg.apache.flex.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.flex.B.prototype.set__foo = function(value) {\n this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.flex.B.prototype, /** @lends {org.apache.flex.B.prototype} */ {\n/** @export */\nbaz: {\nset: org.apache.flex.B.prototype.set__baz},\n/** @export */\nfoo: {\nset: org.apache.flex.B.prototype.set__foo}}\n);";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\norg.apache.flex.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.flex.B.prototype.set__foo = function(value) {\n this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.flex.B.prototype, /** @lends {org.apache.flex.B.prototype} */ {\n/** @export */\nbaz: {\nset: org.apache.flex.B.prototype.set__baz},\n/** @export */\nfoo: {\nset: org.apache.flex.B.prototype.set__foo}}\n);";
assertOut(expected);
}
@@ -189,7 +189,7 @@
{
IClassNode node = getClassNode("public class B extends A {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};} class A {public function set foo(value:Object):void {}}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n * @extends {org.apache.flex.A}\n */\norg.apache.flex.B = function() {\n org.apache.flex.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.B, org.apache.flex.A);\n\n\norg.apache.flex.B.prototype.set__foo = function(value) {\n org.apache.flex.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.flex.B.prototype, /** @lends {org.apache.flex.B.prototype} */ {\n/** @export */\nfoo: {\nset: org.apache.flex.B.prototype.set__foo}}\n);";
+ String expected = "/**\n * @constructor\n * @extends {org.apache.flex.A}\n */\norg.apache.flex.B = function() {\n org.apache.flex.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.B, org.apache.flex.A);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\norg.apache.flex.B.prototype.set__foo = function(value) {\n org.apache.flex.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.flex.B.prototype, /** @lends {org.apache.flex.B.prototype} */ {\n/** @export */\nfoo: {\nset: org.apache.flex.B.prototype.set__foo}}\n);";
assertOut(expected);
}
@@ -198,7 +198,7 @@
{
IClassNode node = getClassNode("import flash.utils.flash_proxy; use namespace flash_proxy; public class B {public function B() {}; flash_proxy function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n */\norg.apache.flex.B.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo\"] = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n */\norg.apache.flex.B.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo\"] = function() {\n};";
assertOut(expected);
}
@@ -208,7 +208,7 @@
{
IClassNode node = getClassNode("public class A extends flash.events.EventDispatcher {public function A(arg1:String, arg2:int) {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -218,7 +218,7 @@
IClassNode node = getClassNode("public class A {public var a:Object;protected var b:String; "
+ "private var c:int; internal var d:uint; var e:Number}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @export\n * @type {Object}\n */\norg.apache.flex.A.prototype.a;\n\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.flex.A.prototype.b;\n\n\n/**\n * @private\n * @type {number}\n */\norg.apache.flex.A.prototype.c = 0;\n\n\n/**\n * @export\n * @type {number}\n */\norg.apache.flex.A.prototype.d = 0;\n\n\n/**\n * @export\n * @type {number}\n */\norg.apache.flex.A.prototype.e;");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @type {Object}\n */\norg.apache.flex.A.prototype.a;\n\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.flex.A.prototype.b;\n\n\n/**\n * @private\n * @type {number}\n */\norg.apache.flex.A.prototype.c = 0;\n\n\n/**\n * @export\n * @type {number}\n */\norg.apache.flex.A.prototype.d = 0;\n\n\n/**\n * @export\n * @type {number}\n */\norg.apache.flex.A.prototype.e;");
}
@Test
@@ -229,7 +229,7 @@
asBlockWalker.visitClass(node);
assertOut("/**\n * @constructor\n" +
" */\norg.apache.flex.A = function() {\n" +
- "};\n\n\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n" +
"/**\n" +
" * @export\n" +
" * @type {Object}\n" +
@@ -319,7 +319,7 @@
assertOut("/**\n * @constructor\n" +
" */\norg.apache.flex.A = function() {\n\n" +
"this.a_ = {foo:1};\n" +
- "};\n\n\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n" +
"/**\n" +
" * @export\n" +
" * @type {Object}\n" +
@@ -408,7 +408,7 @@
asBlockWalker.visitClass(node);
assertOut("/**\n * @constructor\n" +
" */\norg.apache.flex.A = function() {\n" +
- "};\n\n\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n" +
"/**\n" +
" * @export\n" +
" * @type {Object}\n" +
@@ -460,7 +460,7 @@
IClassNode node = getClassNode("public class A {public static var a:int = 10;public static var b:String = initStatic(); "
+ "private static function initStatic():String { return \"foo\"; }}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @export\n * @type {number}\n */\norg.apache.flex.A.a = 10;\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.flex.A.b;\n\n\n/**\n * @private\n * @return {string}\n */\norg.apache.flex.A.initStatic = function() {\n return \"foo\";\n};\n\norg.apache.flex.A.b = org.apache.flex.A.initStatic();\n\n");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @type {number}\n */\norg.apache.flex.A.a = 10;\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.flex.A.b;\n\n\n/**\n * @private\n * @return {string}\n */\norg.apache.flex.A.initStatic = function() {\n return \"foo\";\n};\n\norg.apache.flex.A.b = org.apache.flex.A.initStatic();\n\n");
}
@Test
@@ -468,7 +468,7 @@
{
FileNode node = (FileNode)getNode("package org.apache.flex {\npublic class A {\nimport flash.display.Sprite; Sprite;\n}}", FileNode.class, 0);
asBlockWalker.visitFile(node);
- assertOut("/**\n * org.apache.flex.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('org.apache.flex.A');\n\ngoog.require('flash.display.Sprite');\n\n\n\n/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * org.apache.flex.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes|accessControls}\n */\n\ngoog.provide('org.apache.flex.A');\n\ngoog.require('flash.display.Sprite');\n\n\n\n/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -481,7 +481,7 @@
+ "private static const C:Number = 42;"
+ "foo_bar static const C:String = 'me' + 'you';}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @export\n * @const\n * @type {number}\n */\norg.apache.flex.A.A = 42;\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\norg.apache.flex.A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg.apache.flex.A.C = 42;\n\n\n/**\n * @export\n * @const\n * @type {string}\n */\norg.apache.flex.A.C = 'me' + 'you';");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @const\n * @type {number}\n */\norg.apache.flex.A.A = 42;\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\norg.apache.flex.A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg.apache.flex.A.C = 42;\n\n\n/**\n * @export\n * @const\n * @type {string}\n */\norg.apache.flex.A.C = 'me' + 'you';");
}
@Override
@@ -500,7 +500,7 @@
+ "flash_proxy function get foo6():Object{return null;}"
+ "flash_proxy function set foo6(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n" +
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n" +
"org.apache.flex.A.prototype.get__foo1 = function() {\n return null;\n};\n\n\n" +
"org.apache.flex.A.prototype.set__foo1 = function(value) {\n};\n\n\n" +
"org.apache.flex.A.prototype.get__foo2 = function() {\n return null;\n};\n\n\n" +
@@ -535,7 +535,7 @@
+ "public static function foo7(value:Object):void{}"
+ "flash_proxy static function foo7(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n return org.apache.flex.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo6\"] = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo7\"] = function(value) {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n return org.apache.flex.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo6\"] = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo7\"] = function(value) {\n};");
}
@Test
@@ -546,7 +546,7 @@
+ "public function foo2():Object{function bar2(param1:Object):Object {return null;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return null;\n };\n return bar1();\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return null;\n };\n return bar2('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return null;\n };\n return bar1();\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return null;\n };\n return bar2('foo');\n};");
}
@Test
@@ -558,7 +558,7 @@
+ "public function foo2():String{function bar2(param1:String):String {return param1 + baz1;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.flex.B.prototype.baz1;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return self.baz1;\n };\n return bar1();\n};\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return param1 + self.baz1;\n };\n return bar2('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.flex.B.prototype.baz1;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return self.baz1;\n };\n return bar1();\n};\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return param1 + self.baz1;\n };\n return bar2('foo');\n};");
}
@Test
@@ -578,7 +578,7 @@
+ "public function clone():B { return new B() }"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @return {org.apache.flex.B}\n */\norg.apache.flex.B.prototype.clone = function() {\n return new org.apache.flex.B();\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.B', org.apache.flex.B);\n\n\n/**\n * @export\n * @return {org.apache.flex.B}\n */\norg.apache.flex.B.prototype.clone = function() {\n return new org.apache.flex.B();\n};");
}
@Override
@@ -587,7 +587,7 @@
{
IClassNode node = getClassNode("public class A{}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -598,7 +598,7 @@
// in JS we ignore it
IClassNode node = getClassNode("internal class A{}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -609,7 +609,7 @@
// in JS we ignore it
IClassNode node = getClassNode("public final class A{}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -619,7 +619,7 @@
// (erikdebruin) all JS objects are 'dynamic' by design
IClassNode node = getClassNode("public dynamic class A{}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -628,7 +628,7 @@
{
IClassNode node = getClassNode("public class A implements IEventDispatcher {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @implements {flash.events.IEventDispatcher}\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n * @implements {flash.events.IEventDispatcher}\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Override
@@ -637,7 +637,7 @@
{
IClassNode node = getClassNode("public class A implements IEventDispatcher, IBitmapDrawable {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n * @implements {flash.events.IEventDispatcher}\n * @implements {flash.display.IBitmapDrawable}\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@@ -647,7 +647,7 @@
{
IClassNode node = getClassNode("public class A {public function A() { }}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@@ -657,7 +657,7 @@
{
IClassNode node = getClassNode("public class A {public function A(arg1:String, arg2:int) {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n};");
+ assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);");
}
@Test
@@ -665,7 +665,7 @@
{
IClassNode node = getClassNode("public class A {public function A(arg1:String, arg2:int) {arg2 = arg2 + 2;} public var foo:Array = [];}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n \n this.foo = [];\n arg2 = arg2 + 2;\n};\n\n\n/**\n * @export\n * @type {Array}\n */\norg.apache.flex.A.prototype.foo;");
+ assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n \n this.foo = [];\n arg2 = arg2 + 2;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @type {Array}\n */\norg.apache.flex.A.prototype.foo;");
}
@Test
@@ -673,7 +673,7 @@
{
IClassNode node = getClassNode("public class A extends EventDispatcher {public function A(arg1:String, arg2:int) {arg2 = arg2 + 2;} public var foo:Array = [];}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n org.apache.flex.A.base(this, 'constructor');\n \n this.foo = [];\n arg2 = arg2 + 2;\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * @export\n * @type {Array}\n */\norg.apache.flex.A.prototype.foo;");
+ assertOut("/**\n * @constructor\n * @extends {flash.events.EventDispatcher}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n org.apache.flex.A.base(this, 'constructor');\n \n this.foo = [];\n arg2 = arg2 + 2;\n};\ngoog.inherits(org.apache.flex.A, flash.events.EventDispatcher);\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @type {Array}\n */\norg.apache.flex.A.prototype.foo;");
}
@Test
@@ -681,7 +681,7 @@
{
IClassNode node = getClassNode("public class A {public static const NAME:String = 'Dummy'; public function A(arg1:String = NAME) {_name = arg1;} private var _name:String;}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @param {string=} arg1\n */\norg.apache.flex.A = function(arg1) {\n arg1 = typeof arg1 !== 'undefined' ? arg1 : org.apache.flex.A.NAME;\n this._name = arg1;\n};\n\n\n/**\n * @export\n * @const\n * @type {string}\n */\norg.apache.flex.A.NAME = 'Dummy';\n\n\n/**\n * @private\n * @type {string}\n */\norg.apache.flex.A.prototype._name;");
+ assertOut("/**\n * @constructor\n * @param {string=} arg1\n */\norg.apache.flex.A = function(arg1) {\n arg1 = typeof arg1 !== 'undefined' ? arg1 : org.apache.flex.A.NAME;\n this._name = arg1;\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('org.apache.flex.A', org.apache.flex.A);\n\n\n/**\n * @export\n * @const\n * @type {string}\n */\norg.apache.flex.A.NAME = 'Dummy';\n\n\n/**\n * @private\n * @type {string}\n */\norg.apache.flex.A.prototype._name;");
}
protected IBackend createBackend()
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
index 11d9402..88b5348 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmitter.java
@@ -83,6 +83,12 @@
" }\n" +
"};\n" +
"goog.inherits(com.example.components.MyEventTarget, flash.events.EventDispatcher);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('com.example.components.MyEventTarget', com.example.components.MyEventTarget);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -117,12 +123,6 @@
"com.example.components.MyEventTarget.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyEventTarget', qName: 'com.example.components.MyEventTarget', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('com.example.components.MyEventTarget', com.example.components.MyEventTarget);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -171,6 +171,12 @@
" * @interface\n" +
" */\ncom.example.components.TestInterface = function() {\n" +
"};\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('com.example.components.TestInterface', com.example.components.TestInterface);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -179,12 +185,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"com.example.components.TestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestInterface', qName: 'com.example.components.TestInterface', kind: 'interface' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('com.example.components.TestInterface', com.example.components.TestInterface);\n" +
"\n" +
"\n" +
"\n" +
@@ -229,6 +229,12 @@
"\n" +
"\n" +
"/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('com.example.components.TestClass', com.example.components.TestClass);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
" * Metadata\n" +
" *\n" +
" * @type {Object.<string, Array.<Object>>}\n" +
@@ -236,12 +242,6 @@
"com.example.components.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com.example.components.TestClass', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('com.example.components.TestClass', com.example.components.TestClass);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -293,6 +293,12 @@
"\n" +
"\n" +
"/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('com.example.components.TestClass', com.example.components.TestClass);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
" * Metadata\n" +
" *\n" +
" * @type {Object.<string, Array.<Object>>}\n" +
@@ -300,12 +306,6 @@
"com.example.components.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com.example.components.TestClass', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('com.example.components.TestClass', com.example.components.TestClass);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
index 6f8d28d..7c9fa2f 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
@@ -967,7 +967,7 @@
{
IClassNode node = (IClassNode) getNode("import flash.display.IBitmapDrawable; public class B implements IBitmapDrawable { public function B() { IBitmapDrawable(b).type = ''; } }", ClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @implements {flash.display.IBitmapDrawable}\n */\nB = function() {\n org.apache.flex.utils.Language.as(b, flash.display.IBitmapDrawable, true).type = '';\n};");
+ assertOut("/**\n * @constructor\n * @implements {flash.display.IBitmapDrawable}\n */\nB = function() {\n org.apache.flex.utils.Language.as(b, flash.display.IBitmapDrawable, true).type = '';\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('B', B);");
}
@Test
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
index 7729981..1f135ad 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
@@ -134,7 +134,7 @@
IClassNode node = (IClassNode) getNode("protected var foo:Foo = new Foo('bar', 42);",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = new Foo('bar', 42);\n};\n\n\n/**\n * @protected\n * @type {Foo}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = new Foo('bar', 42);\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @type {Foo}\n */\nFalconTest_A.prototype.foo;");
}
@Test
@@ -167,7 +167,7 @@
IClassNode node = (IClassNode) getNode("protected var foo:Array = [ 'foo' ]",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * @protected\n * @type {Array}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @type {Array}\n */\nFalconTest_A.prototype.foo;");
}
@Test
@@ -176,7 +176,7 @@
IClassNode node = (IClassNode) getNode("protected var foo:Object = { 'foo': 'bar' }",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * @protected\n * @type {Object}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @type {Object}\n */\nFalconTest_A.prototype.foo;");
}
@Test
@@ -185,7 +185,7 @@
IClassNode node = (IClassNode) getNode("import flash.utils.flash_proxy;use namespace flash_proxy;public static var foo:Object = initFoo(); flash_proxy static function initFoo():Object { return null; }",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n * @type {Object}\n */\nFalconTest_A.foo;\n\n\n/**\n * @return {Object}\n */\nFalconTest_A[\"http://www.adobe.com/2006/actionscript/flash/proxy::initFoo\"] = function() {\n return null;\n};\n\nFalconTest_A.foo = FalconTest_A[\"http://www.adobe.com/2006/actionscript/flash/proxy::initFoo\"]();\n\n");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @export\n * @type {Object}\n */\nFalconTest_A.foo;\n\n\n/**\n * @return {Object}\n */\nFalconTest_A[\"http://www.adobe.com/2006/actionscript/flash/proxy::initFoo\"] = function() {\n return null;\n};\n\nFalconTest_A.foo = FalconTest_A[\"http://www.adobe.com/2006/actionscript/flash/proxy::initFoo\"]();\n\n");
}
@Test
@@ -194,7 +194,7 @@
IClassNode node = (IClassNode) getNode("static public var foo:Object = { 'foo': 'bar' }",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n * @type {Object}\n */\nFalconTest_A.foo = {'foo':'bar'};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @export\n * @type {Object}\n */\nFalconTest_A.foo = {'foo':'bar'};");
}
@Test
@@ -203,7 +203,7 @@
IClassNode node = (IClassNode) getNode("protected var foo:Number = parseFloat('1E2')",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * @protected\n * @type {number}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @type {number}\n */\nFalconTest_A.prototype.foo;");
}
@Test
@@ -212,7 +212,7 @@
IClassNode node = (IClassNode) getNode("private static var empty:Function = function():void {}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {Function}\n */\nFalconTest_A.empty = function() {\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @type {Function}\n */\nFalconTest_A.empty = function() {\n};");
}
@Override
@@ -293,7 +293,7 @@
IClassNode node = (IClassNode) getNode("protected const foo:Number = parseFloat('1E2');",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = parseFloat('1E2');\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo;");
}
@Test
@@ -302,7 +302,7 @@
IClassNode node = (IClassNode) getNode("protected const foo:Array = [ 'foo' ]",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * @protected\n * @const\n * @type {Array}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = ['foo'];\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @const\n * @type {Array}\n */\nFalconTest_A.prototype.foo;");
}
@Test
@@ -311,7 +311,7 @@
IClassNode node = (IClassNode) getNode("protected const foo:Object = { 'foo': 'bar' }",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * @protected\n * @const\n * @type {Object}\n */\nFalconTest_A.prototype.foo;");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\nthis.foo = {'foo':'bar'};\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @protected\n * @const\n * @type {Object}\n */\nFalconTest_A.prototype.foo;");
}
@Override
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSInterface.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSInterface.java
index bacd034..4457e09 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSInterface.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSInterface.java
@@ -34,6 +34,42 @@
*/
public class TestFlexJSInterface extends TestGoogInterface
{
+ @Override
+ @Test
+ public void testSimple()
+ {
+ IInterfaceNode node = getInterfaceNode("public interface IA{}");
+ asBlockWalker.visitInterface(node);
+ assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+ }
+
+ @Override
+ @Test
+ public void testSimpleExtends()
+ {
+ IInterfaceNode node = getInterfaceNode("public interface IA extends IB{}");
+ asBlockWalker.visitInterface(node);
+ assertOut("/**\n * @interface\n * @extends {IB}\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+ }
+
+ @Override
+ @Test
+ public void testSimpleExtendsMultiple()
+ {
+ IInterfaceNode node = getInterfaceNode("public interface IA extends IB, IC, ID {}");
+ asBlockWalker.visitInterface(node);
+ assertOut("/**\n * @interface\n * @extends {IB}\n * @extends {IC}\n * @extends {ID}\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+ }
+
+ @Override
+ @Test
+ public void testQualifiedExtendsMultiple()
+ {
+ IInterfaceNode node = getInterfaceNode("public interface IA extends foo.bar.IB, baz.goo.IC, foo.ID {}");
+ asBlockWalker.visitInterface(node);
+ assertOut("/**\n * @interface\n * @extends {foo.bar.IB}\n * @extends {baz.goo.IC}\n * @extends {foo.ID}\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);");
+ }
+
@Override
@Test
@@ -43,7 +79,7 @@
+ "function get foo1():Object;"
+ "function set foo1(value:Object):void;}");
asBlockWalker.visitInterface(node);
- assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/** * @type {Object}\n */IA.prototype.foo1;");
+ assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);\n/** * @type {Object}\n */IA.prototype.foo1;");
}
@Override
@@ -54,7 +90,7 @@
+ "function baz1():Object;"
+ "function baz2(value:Object):void;}");
asBlockWalker.visitInterface(node);
- assertOut("/**\n * @interface\n */\nIA = function() {\n};\nIA.prototype.baz1 = function() {\n};\nIA.prototype.baz2 = function(value) {\n};");
+ assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);\nIA.prototype.baz1 = function() {\n};\nIA.prototype.baz2 = function(value) {\n};");
}
@Override
@@ -67,7 +103,7 @@
+ "function baz1():Object;"
+ "function baz2(value:Object):void;}");
asBlockWalker.visitInterface(node);
- assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/** * @type {Object}\n */IA.prototype.foo1;\nIA.prototype.baz1 = function() {\n};\nIA.prototype.baz2 = function(value) {\n};");
+ assertOut("/**\n * @interface\n */\nIA = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('IA', IA);\n/** * @type {Object}\n */IA.prototype.foo1;\nIA.prototype.baz1 = function() {\n};\nIA.prototype.baz2 = function(value) {\n};");
}
protected IBackend createBackend()
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
index 11d2321..35d1443 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
@@ -113,7 +113,7 @@
{
IClassNode node = (IClassNode) getNode("public function FalconTest_A(){this.foo();}; private function foo():String{return '';};", IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n this.foo();\n};\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return '';\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n this.foo();\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return '';\n};");
}
@Test
@@ -121,7 +121,7 @@
{
IClassNode node = (IClassNode) getNode("public function FalconTest_A(){foo();}; private function foo():String{return '';};", IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n this.foo();\n};\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return '';\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n this.foo();\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return '';\n};");
}
@Override
@@ -130,7 +130,7 @@
{
IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private var baz:String; private function foo():String{return this.baz;};", IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return this.baz;\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return this.baz;\n};");
}
@Test
@@ -138,7 +138,7 @@
{
IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private var baz:String; private function foo():String{return baz;};", IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return this.baz;\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n return this.baz;\n};");
}
@Override
@@ -147,7 +147,7 @@
{
IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private function foo(value:int):String{return value;}; private function bar():String{if(true){while(i){return this.foo(42);}}};", IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n return value;\n};\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.bar = function() {\n if (true) {\n while (i) {\n return this.foo(42);\n }\n }\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n return value;\n};\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.bar = function() {\n if (true) {\n while (i) {\n return this.foo(42);\n }\n }\n};");
}
@Test
@@ -155,7 +155,7 @@
{
IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private function foo(value:int):String{return value;}; private function bar():void{if(true){while(i){foo(42);}}};", IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n return value;\n};\n\n\n/**\n * @private\n */\nFalconTest_A.prototype.bar = function() {\n if (true) {\n while (i) {\n this.foo(42);\n }\n }\n};");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n return value;\n};\n\n\n/**\n * @private\n */\nFalconTest_A.prototype.bar = function() {\n if (true) {\n while (i) {\n this.foo(42);\n }\n }\n};");
}
@Override
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
index f9afc81..360b875 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
@@ -82,7 +82,7 @@
" * @constructor\n" +
" */\n" +
"A = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('A', A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -93,12 +93,6 @@
"A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('A', A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -136,7 +130,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -147,12 +141,6 @@
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -190,7 +178,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -201,12 +189,6 @@
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -253,7 +235,7 @@
" doit();\n" +
" }\n" +
" }\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -264,12 +246,6 @@
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -310,7 +286,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -321,12 +297,6 @@
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -368,7 +338,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -385,12 +355,6 @@
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -443,7 +407,7 @@
" */\n" +
"foo.bar.baz.A = function() {\n" +
" var /** @type {foo.bar.baz.A.InternalClass} */ internalClass = new foo.bar.baz.A.InternalClass();\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n/" +
"**\n" +
@@ -454,12 +418,6 @@
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -484,7 +442,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A.InternalClass = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -493,12 +451,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.InternalClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'InternalClass', qName: 'foo.bar.baz.A.InternalClass', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
"\n" +
"\n" +
"\n" +
@@ -548,7 +500,7 @@
" */\n" +
"foo.bar.baz.A = function() {\n" +
" foo.bar.baz.A.internalFunction();\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n/" +
"**\n" +
@@ -557,12 +509,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"\n" +
@@ -617,7 +563,7 @@
" */\n" +
"foo.bar.baz.A = function() {\n" +
" foo.bar.baz.A.internalVar = 3;\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n/" +
"**\n" +
@@ -626,12 +572,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"\n" +
@@ -701,7 +641,7 @@
" var /** @type {string} */ myString = foo.bar.baz.A.InternalClass.someString;\n" +
" myString = foo.bar.baz.A.InternalClass.someStaticFunction();\n" +
" myString = internalClass.someMethod();\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -710,12 +650,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"\n" +
@@ -742,7 +676,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A.InternalClass = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -778,12 +712,6 @@
"foo.bar.baz.A.InternalClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'InternalClass', qName: 'foo.bar.baz.A.InternalClass', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -853,7 +781,7 @@
" var /** @type {foo.bar.baz.A.InternalClass} */ internalClass = new foo.bar.baz.A.InternalClass();\n" +
" this.myString = internalClass.someString;\n" +
" internalClass.someString = this.myString;\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"foo.bar.baz.A.prototype.get__myString = function() {\n" +
@@ -879,12 +807,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"\n" +
@@ -915,7 +837,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.baz.A.InternalClass = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
"\n" +
"\n" +
"foo.bar.baz.A.InternalClass.prototype.get__someString = function() {\n" +
@@ -943,12 +865,6 @@
"foo.bar.baz.A.InternalClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'InternalClass', qName: 'foo.bar.baz.A.InternalClass', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -1011,7 +927,7 @@
"foo.bar.baz.A = function() {\n" +
" var /** @type {foo.bar.baz.A.ITestInterface} */ internalClass = org.apache.flex.utils.Language.as(new foo.bar.baz.A.InternalClass(), foo.bar.baz.A.ITestInterface);\n" +
" internalClass.test();\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -1020,12 +936,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A', foo.bar.baz.A);\n" +
"\n" +
"\n" +
"\n" +
@@ -1052,7 +962,7 @@
" * @interface\n" +
" */\n" +
"foo.bar.baz.A.ITestInterface = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A.ITestInterface', foo.bar.baz.A.ITestInterface);\n" +
"foo.bar.baz.A.ITestInterface.prototype.test = function() {\n" +
"};\n" +
"\n" +
@@ -1065,12 +975,6 @@
"foo.bar.baz.A.ITestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ITestInterface', qName: 'foo.bar.baz.A.ITestInterface', kind: 'interface' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A.ITestInterface', foo.bar.baz.A.ITestInterface);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -1095,7 +999,7 @@
" * @implements {foo.bar.baz.A.ITestInterface}\n" +
" */\n" +
"foo.bar.baz.A.InternalClass = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -1111,12 +1015,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.baz.A.InternalClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'InternalClass', qName: 'foo.bar.baz.A.InternalClass', kind: 'class' }], interfaces: [foo.bar.baz.A.ITestInterface] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.baz.A.InternalClass', foo.bar.baz.A.InternalClass);\n" +
"\n" +
"\n" +
"\n" +
@@ -1177,7 +1075,7 @@
" * @constructor\n" +
" */\n" +
"foo.bar.A.Internal = function() {\n" +
- "};\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('foo.bar.A.Internal', foo.bar.A.Internal);\n" +
"\n" +
"\n" +
"/**\n" +
@@ -1194,12 +1092,6 @@
" * @type {Object.<string, Array.<Object>>}\n" +
" */\n" +
"foo.bar.A.Internal.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Internal', qName: 'foo.bar.A.Internal', kind: 'class' }] };\n" +
- "\n" +
- "\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('foo.bar.A.Internal', foo.bar.A.Internal);\n" +
"\n" +
"\n" +
"\n" +
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
index aa83471..c6adb3f 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
@@ -515,7 +515,7 @@
" * @constructor\n" +
" */\n" +
"FalconTest_A = function() {\n" +
- "};\n\n\n" +
+ "};\n\n\n/**\n * Prevent renaming of class. Needed for reflection.\n */\ngoog.exportSymbol('FalconTest_A', FalconTest_A);\n\n\n" +
"FalconTest_A.prototype.falconTest_a = function() {\n" +
" var self = this;\n" +
" var /** @type {Function} */ __localFn0__ = function(foo, bar) {\n" +
@@ -587,12 +587,6 @@
"FalconTest_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FalconTest_A', qName: 'FalconTest_A', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('FalconTest_A', FalconTest_A);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
index 4f10311..1c5433b 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
@@ -164,6 +164,12 @@
" this.mxmldp;\n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -175,12 +181,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }], interfaces: [org.apache.flex.core.IChrome] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -257,6 +257,12 @@
" this.mxmldp;\n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -268,12 +274,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }], interfaces: [org.apache.flex.core.IChrome, org.apache.flex.core.IPopUp] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -370,6 +370,12 @@
" \n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -390,12 +396,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -492,6 +492,12 @@
" \n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -512,12 +518,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -615,6 +615,12 @@
" \n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -664,12 +670,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -772,6 +772,12 @@
" \n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -790,12 +796,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
index 5f7f7ef..e4c23c5 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
@@ -77,6 +77,12 @@
" this.mxmldp;\n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -98,12 +104,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -179,6 +179,12 @@
" this.mxmldp;\n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -205,12 +211,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
@@ -285,6 +285,12 @@
" this.mxmldp;\n" +
"};\n" +
"goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
"\n" +
"\n" +
"\n" +
@@ -303,12 +309,6 @@
"AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName', kind: 'class' }] };\n" +
"\n" +
"\n" +
- "/**\n" +
- " * Prevent renaming of class. Needed for reflection.\n" +
- " */\n" +
- "goog.exportSymbol('AppName', AppName);\n" +
- "\n" +
- "\n" +
"\n" +
"/**\n" +
" * Reflection\n" +
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java
index 99b88ba..b18ca07 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLEvents.java
@@ -37,7 +37,7 @@
.getAncestorOfType(IMXMLDocumentNode.class);
mxmlBlockWalker.walk(dnode);
///event
- assertMapping(node, 0, 6, 68, 2, 68, 7); // event
+ assertMapping(node, 0, 6, 74, 2, 74, 7); // event
//the start column in the ActionScript seems to be outside the quote
//instead of inside. that seems like a bug. -JT
}
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java
index d43e6cb..84669b9 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/sourcemaps/TestSourceMapMXMLScript.java
@@ -45,7 +45,7 @@
assertTrue(definitionName.startsWith(getClass().getSimpleName()));
int endColumn = definitionName.length() + 14;
///**\n * @export\n * @type {*}\n */\nFalconTest_A.prototype.foo
- assertMapping(node, 0, 4, 42, 0, 42, endColumn); // foo
+ assertMapping(node, 0, 4, 48, 0, 48, endColumn); // foo
}
@Test
@@ -63,11 +63,11 @@
assertTrue(definitionName.startsWith(getClass().getSimpleName()));
int nameEndColumn = definitionName.length() + 14;
///**\n * @export\n * @type {*}\n */\nFalconTest_A.prototype.foo
- assertMapping(node, 0, 9, 38, 0, 38, nameEndColumn); // foo
- assertMapping(node, 0, 0, 38, nameEndColumn, 38, nameEndColumn + 11); // = function
- assertMapping(node, 0, 12, 38, nameEndColumn + 11, 38, nameEndColumn + 12); // (
- assertMapping(node, 0, 13, 38, nameEndColumn + 12, 38, nameEndColumn + 13); // )
- assertMapping(node, 0, 14, 38, nameEndColumn + 14, 38, nameEndColumn + 15); // {
- assertMapping(node, 0, 15, 39, 0, 39, 1); // }
+ assertMapping(node, 0, 9, 44, 0, 44, nameEndColumn); // foo
+ assertMapping(node, 0, 0, 44, nameEndColumn, 44, nameEndColumn + 11); // = function
+ assertMapping(node, 0, 12, 44, nameEndColumn + 11, 44, nameEndColumn + 12); // (
+ assertMapping(node, 0, 13, 44, nameEndColumn + 12, 44, nameEndColumn + 13); // )
+ assertMapping(node, 0, 14, 44, nameEndColumn + 14, 44, nameEndColumn + 15); // {
+ assertMapping(node, 0, 15, 45, 0, 45, 1); // }
}
}
diff --git a/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js b/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
index 7da2ae9..560c1a1 100644
--- a/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/FlexJSTest_again_result.js
@@ -127,6 +127,12 @@
goog.inherits(FlexJSTest_again, org.apache.flex.core.Application);
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('FlexJSTest_again', FlexJSTest_again);
+
+
/**
* @export
@@ -176,12 +182,6 @@
FlexJSTest_again.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FlexJSTest_again', qName: 'FlexJSTest_again', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('FlexJSTest_again', FlexJSTest_again);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/files/LocalFunction_result.js b/compiler-jx/src/test/resources/flexjs/files/LocalFunction_result.js
index 957a84a..301286d 100644
--- a/compiler-jx/src/test/resources/flexjs/files/LocalFunction_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/LocalFunction_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('LocalFunction', LocalFunction);
+
+
+/**
* @private
* @type {string}
*/
@@ -66,12 +72,6 @@
LocalFunction.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'LocalFunction', qName: 'LocalFunction', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('LocalFunction', LocalFunction);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js b/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
index f3bd88d..7fe3836 100644
--- a/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/MyInitialView_result.js
@@ -200,6 +200,12 @@
goog.inherits(MyInitialView, org.apache.flex.core.View);
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('MyInitialView', MyInitialView);
+
+
/**
* @private
@@ -845,12 +851,6 @@
* @type {Object.<string, Array.<Object>>}
*/
MyInitialView.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyInitialView', qName: 'MyInitialView', kind: 'class' }] };
-
-
- /**
- * Prevent renaming of class. Needed for reflection.
- */
- goog.exportSymbol('MyInitialView', MyInitialView);
diff --git a/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js b/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
index 7fde95a..e72ba30 100644
--- a/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/controllers/MyController_result.js
@@ -44,6 +44,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('controllers.MyController', controllers.MyController);
+
+
+/**
* @private
* @type {string}
*/
@@ -154,12 +160,6 @@
controllers.MyController.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyController', qName: 'controllers.MyController', kind: 'class' }], interfaces: [org.apache.flex.core.IDocument] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('controllers.MyController', controllers.MyController);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js b/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
index ff0160f..ab547d7 100644
--- a/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/models/MyModel_result.js
@@ -40,6 +40,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('models.MyModel', models.MyModel);
+
+
+/**
* @private
* @type {string}
*/
@@ -105,12 +111,6 @@
models.MyModel.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyModel', qName: 'models.MyModel', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('models.MyModel', models.MyModel);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js b/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
index 7bc6a18..dc88afc 100644
--- a/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
+++ b/compiler-jx/src/test/resources/flexjs/files/wildcard_import_result.js
@@ -48,6 +48,12 @@
goog.inherits(wildcard_import, org.apache.flex.core.Application);
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('wildcard_import', wildcard_import);
+
+
/**
* @private
@@ -66,12 +72,6 @@
wildcard_import.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'wildcard_import', qName: 'wildcard_import', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('wildcard_import', wildcard_import);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/Test_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/Test_result.js
index 619f4f8..d6956cb 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/Test_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/Test_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Test', Test);
+
+
+/**
* @export
* @override
*/
@@ -61,12 +67,6 @@
Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Test', Test);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/A_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/A_result.js
index 0eea031..fb0f5cf 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/A_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/A_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.A', classes.A);
+
+
+/**
* @export
* @return {classes.B}
*/
@@ -61,12 +67,6 @@
classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A', kind: 'class' }], interfaces: [interfaces.IA] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.A', classes.A);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/B_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/B_result.js
index 76bf513..9790c7e 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/B_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/B_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.B', classes.B);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.B', classes.B);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/C_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/C_result.js
index 192a0c8..4a7d8af 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/C_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/classes/C_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.C', classes.C);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.C', classes.C);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IA_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IA_result.js
index 07eb287..3e4ae11 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IA_result.js
@@ -31,6 +31,12 @@
*/
interfaces.IA = function() {
};
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.ID', interfaces.IA);
interfaces.IA.prototype.someFunction = function() {
};
interfaces.IA.prototype.someOtherFunction = function() {
@@ -45,12 +51,6 @@
interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA', kind: 'interface' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.ID', interfaces.IA);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IB_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IB_result.js
index 11a4683..9a87619 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IB_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IB_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IB', interfaces.IB);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB', kind: 'interface' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IB', interfaces.IB);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IC_result.js b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IC_result.js
index 3275f7b..0e24b6c 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IC_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/bad_overrides/interfaces/IC_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IC', interfaces.IC);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC', kind: 'interface' }]};
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IC', interfaces.IC);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular/Base_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular/Base_result.js
index b1f7ca1..06959e3 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular/Base_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular/Base_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Base', Base);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -43,12 +49,6 @@
Base.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Base', qName: 'Base', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Base', Base);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular/Super_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular/Super_result.js
index bb2d3ab..c85e56a 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular/Super_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular/Super_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Super', Super);
+
+
+/**
* @private
* @type {Base}
*/
@@ -46,12 +52,6 @@
Super.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Super', qName: 'Super', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Super', Super);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/A_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/A_result.js
index 8fd88dd..1f7870b 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/A_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/A_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('A', A);
+
+
+/**
* @private
*/
A.prototype.test = function() {
@@ -49,12 +55,6 @@
A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'A', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('A', A);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/B_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/B_result.js
index ff881d1..2af8cc9 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/B_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/B_result.js
@@ -33,6 +33,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('B', B);
+
+
+/**
* @export
* @param {boolean} b
* @return {number}
@@ -52,12 +58,6 @@
B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'B', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('B', B);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/C_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/C_result.js
index 9dece88..ee8ef5e 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/C_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/C_result.js
@@ -37,6 +37,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('C', C);
+
+
+/**
* @export
* @param {boolean} b
* @return {number}
@@ -54,12 +60,6 @@
C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'C', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('C', C);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/D_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/D_result.js
index 3dcbe6f..9f17316 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/D_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/D_result.js
@@ -37,6 +37,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('D', D);
+
+
+/**
* @export
* @param {boolean} b
* @return {number}
@@ -54,12 +60,6 @@
D.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'D', qName: 'D', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('D', D);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/E_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/E_result.js
index ccf81c0..06aefa7 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/E_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/E_result.js
@@ -33,6 +33,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('E', E);
+
+
+/**
* @export
* @param {boolean} b
* @return {number}
@@ -50,12 +56,6 @@
E.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'E', qName: 'E', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('E', E);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/F_result.js b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/F_result.js
index 96d9530..f099f91 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/circular_proto/F_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/circular_proto/F_result.js
@@ -37,6 +37,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('F', F);
+
+
+/**
* @export
* @param {boolean} b
* @return {number}
@@ -54,12 +60,6 @@
F.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'F', qName: 'F', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('F', F);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/Test_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/Test_result.js
index d2f47bd..d4bda25 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/Test_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/Test_result.js
@@ -43,6 +43,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Test', Test);
+
+
+/**
* @export
* @param {interfaces.IC} ic
* @return {interfaces.IC}
@@ -63,12 +69,6 @@
Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test', kind: 'class' }], interfaces: [interfaces.IA, interfaces.IE] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Test', Test);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/A_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/A_result.js
index c10bc7a..a7a94f3 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/A_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/A_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.A', classes.A);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -43,12 +49,6 @@
classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.A', classes.A);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/B_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/B_result.js
index 76bf513..9790c7e 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/B_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/B_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.B', classes.B);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.B', classes.B);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/C_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/C_result.js
index 192a0c8..4a7d8af 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/C_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/classes/C_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.C', classes.C);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.C', classes.C);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IA_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IA_result.js
index 42f1103..571d4a9 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IA_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IA', interfaces.IA);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -41,12 +47,6 @@
interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA', kind: 'interface' }], interfaces: [interfaces.IC] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IA', interfaces.IA);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IC_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IC_result.js
index ebf9b84..58c7e5c 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IC_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IC_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IC', interfaces.IC);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -41,12 +47,6 @@
interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC', kind: 'interface' }], interfaces: [interfaces.ID] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IC', interfaces.IC);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/ID_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/ID_result.js
index 02f275d..852a737 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/ID_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/ID_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.ID', interfaces.ID);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
interfaces.ID.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ID', qName: 'interfaces.ID', kind: 'interface' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.ID', interfaces.ID);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IE_result.js b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IE_result.js
index 5e48a10..c5126fe 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IE_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/interfaces/interfaces/IE_result.js
@@ -28,6 +28,12 @@
*/
interfaces.IE = function() {
};
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IE', interfaces.IE);
interfaces.IE.prototype.myMethod = function() {
};
/** * @type {string}
@@ -42,12 +48,6 @@
interfaces.IE.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IE', qName: 'interfaces.IE', kind: 'interface' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IE', interfaces.IE);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/internal/MainClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/internal/MainClass_result.js
index c1f9dd7..69c42ce 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/internal/MainClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/internal/MainClass_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('MainClass', MainClass);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -41,12 +47,6 @@
MainClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MainClass', qName: 'MainClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('MainClass', MainClass);
-
-
/**
* Reflection
@@ -76,6 +76,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('MainClass.InternalClass', MainClass.InternalClass);
+
+
+/**
* @export
* @type {OtherClass}
*/
@@ -90,12 +96,6 @@
MainClass.InternalClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'InternalClass', qName: 'MainClass.InternalClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('MainClass.InternalClass', MainClass.InternalClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/internal/OtherClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/internal/OtherClass_result.js
index affa70c..c368fdb 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/internal/OtherClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/internal/OtherClass_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('OtherClass', OtherClass);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
OtherClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'OtherClass', qName: 'OtherClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('OtherClass', OtherClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/Test_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/Test_result.js
index 1ff92d3..5df8dfc 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/Test_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/Test_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Test', Test);
+
+
+/**
* @export
* @override
*/
@@ -61,12 +67,6 @@
Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Test', Test);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/A_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/A_result.js
index 31cb53a..7f4fd99 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/A_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/A_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.A', classes.A);
+
+
+/**
* @export
* @return {classes.B}
*/
@@ -59,12 +65,6 @@
classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A', kind: 'class' }], interfaces: [interfaces.IA] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.A', classes.A);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/B_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/B_result.js
index 76bf513..9790c7e 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/B_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/B_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.B', classes.B);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.B', classes.B);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/C_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/C_result.js
index b16f8f8..f0ebfe1 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/C_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/classes/C_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.C', classes.C);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -43,12 +49,6 @@
classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('classes.C', classes.C);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IA_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IA_result.js
index 722bc2e..759cbff 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IA_result.js
@@ -29,6 +29,12 @@
*/
interfaces.IA = function() {
};
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IA', interfaces.IA);
interfaces.IA.prototype.someFunction = function() {
};
interfaces.IA.prototype.someOtherFunction = function() {
@@ -43,12 +49,6 @@
interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA', kind: 'interface' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IA', interfaces.IA);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IB_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IB_result.js
index 11a4683..9a87619 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IB_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IB_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IB', interfaces.IB);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -38,12 +44,6 @@
interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB', kind: 'interface' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IB', interfaces.IB);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IC_result.js b/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IC_result.js
index aef832b..8638f4a 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IC_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/overrides/interfaces/IC_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('interfaces.IC', interfaces.IC);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -41,12 +47,6 @@
interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC', kind: 'interface' }], interfaces: [interfaces.IB] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('interfaces.IC', interfaces.IC);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js
index deee65d..05e6052 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/DifferentPackageAsConflict_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('DifferentPackageAsConflict', DifferentPackageAsConflict);
+
+
+/**
* @private
* @type {mypackage.TestClass}
*/
@@ -48,12 +54,6 @@
DifferentPackageAsConflict.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'DifferentPackageAsConflict', qName: 'DifferentPackageAsConflict', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('DifferentPackageAsConflict', DifferentPackageAsConflict);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/Event_result.js
index 7169607..fca59d0 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Event', Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js
index 229dbc2..8f9226f 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/mypackage/TestClass_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
+
+
+/**
* @private
* @type {otherpackage.Event}
*/
@@ -50,12 +56,6 @@
mypackage.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'mypackage.TestClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js
index b9f337c..809700a 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_different_package_as_conflict/otherpackage/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('otherpackage.Event', otherpackage.Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
otherpackage.Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'otherpackage.Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('otherpackage.Event', otherpackage.Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/Event_result.js
index 7169607..fca59d0 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Event', Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js
index 54347bc..3c0d459 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/NoConflictNoWindow_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('NoConflictNoWindow', NoConflictNoWindow);
+
+
+/**
* @private
* @type {mypackage.TestClass}
*/
@@ -48,12 +54,6 @@
NoConflictNoWindow.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'NoConflictNoWindow', qName: 'NoConflictNoWindow', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('NoConflictNoWindow', NoConflictNoWindow);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js
index c5f599c..9577515 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_no_window/mypackage/TestClass_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
+
+
+/**
* @private
* @type {Event}
*/
@@ -48,12 +54,6 @@
mypackage.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'mypackage.TestClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/Event_result.js
index 7169607..fca59d0 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Event', Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js
index c99ffad..7de639b 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/NoConflictUseWindow_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('NoConflictUseWindow', NoConflictUseWindow);
+
+
+/**
* @private
* @type {mypackage.TestClass}
*/
@@ -48,12 +54,6 @@
NoConflictUseWindow.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'NoConflictUseWindow', qName: 'NoConflictUseWindow', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('NoConflictUseWindow', NoConflictUseWindow);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js
index c5f599c..9577515 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_no_conflict_use_window/mypackage/TestClass_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
+
+
+/**
* @private
* @type {Event}
*/
@@ -48,12 +54,6 @@
mypackage.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'mypackage.TestClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/Event_result.js
index 7169607..fca59d0 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Event', Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js
index 83f36cc..f599534 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/SamePackageAsConflict_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('SamePackageAsConflict', SamePackageAsConflict);
+
+
+/**
* @private
* @type {mypackage.TestClass}
*/
@@ -48,12 +54,6 @@
SamePackageAsConflict.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'SamePackageAsConflict', qName: 'SamePackageAsConflict', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('SamePackageAsConflict', SamePackageAsConflict);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js
index 49172f8..6429aef 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('mypackage.Event', mypackage.Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
mypackage.Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'mypackage.Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.Event', mypackage.Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js
index fbb13ea..3f81829 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_same_package_as_conflict/mypackage/TestClass_result.js
@@ -36,6 +36,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
+
+
+/**
* @private
* @type {mypackage.Event}
*/
@@ -50,12 +56,6 @@
mypackage.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'mypackage.TestClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/Event_result.js
index 7169607..fca59d0 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Event', Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Event', Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/UseWindow_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/UseWindow_result.js
index ca1d8dd..0e252ae 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/UseWindow_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/UseWindow_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('UseWindow', UseWindow);
+
+
+/**
* @private
* @type {mypackage.TestClass}
*/
@@ -48,12 +54,6 @@
UseWindow.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'UseWindow', qName: 'UseWindow', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('UseWindow', UseWindow);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/mypackage/TestClass_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/mypackage/TestClass_result.js
index 7af3f86..eb47554 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/mypackage/TestClass_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/mypackage/TestClass_result.js
@@ -37,6 +37,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
+
+
+/**
* @private
* @type {Event}
*/
@@ -58,12 +64,6 @@
mypackage.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'mypackage.TestClass', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('mypackage.TestClass', mypackage.TestClass);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/otherpackage/Event_result.js b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/otherpackage/Event_result.js
index b9f337c..809700a 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/otherpackage/Event_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/package_conflicts_use_window/otherpackage/Event_result.js
@@ -32,6 +32,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('otherpackage.Event', otherpackage.Event);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -39,12 +45,6 @@
otherpackage.Event.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Event', qName: 'otherpackage.Event', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('otherpackage.Event', otherpackage.Event);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js b/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
index 2e5c7ec..720e39c 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
@@ -35,6 +35,12 @@
goog.inherits(Base, Super);
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Base', Base);
+
+
Base.prototype.get__text = function() {
return "A" + Base.superClass_.get__text.apply(this);
};
@@ -63,12 +69,6 @@
Base.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Base', qName: 'Base', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Base', Base);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/super/Super_result.js b/compiler-jx/src/test/resources/flexjs/projects/super/Super_result.js
index a448430..d77b6b2 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/super/Super_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/super/Super_result.js
@@ -31,6 +31,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Super', Super);
+
+
+/**
* @private
* @type {string}
*/
@@ -65,12 +71,6 @@
Super.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Super', qName: 'Super', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('Super', Super);
-
-
/**
* Reflection
diff --git a/compiler-jx/src/test/resources/flexjs/projects/xml_requires/XMLRequire_result.js b/compiler-jx/src/test/resources/flexjs/projects/xml_requires/XMLRequire_result.js
index 17ab6dc..191ad8d 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/xml_requires/XMLRequire_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/xml_requires/XMLRequire_result.js
@@ -34,6 +34,12 @@
/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('XMLRequire', XMLRequire);
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
@@ -41,12 +47,6 @@
XMLRequire.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'XMLRequire', qName: 'XMLRequire', kind: 'class' }] };
-/**
- * Prevent renaming of class. Needed for reflection.
- */
-goog.exportSymbol('XMLRequire', XMLRequire);
-
-
/**
* Reflection