Repository: flex-asjs
Updated Branches:
  refs/heads/feature/amf 2729f4328 -> 0a7f3df5f


move ClassAliasBead so it can depend on Reflection APIs


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ea18dbda
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ea18dbda
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ea18dbda

Branch: refs/heads/feature/amf
Commit: ea18dbda41852831daa6b4b89cffc8fb6b134f7c
Parents: 2729f43
Author: Alex Harui <aha...@apache.org>
Authored: Fri Sep 1 11:06:16 2017 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Fri Sep 1 11:06:16 2017 -0700

----------------------------------------------------------------------
 .../src/main/config/compile-js-config.xml       |  7 +-
 .../flex/org/apache/flex/core/ClassAliasBead.as | 91 -------------------
 .../Core/src/main/resources/basic-manifest.xml  |  1 -
 .../src/main/config/compile-swf-config.xml      |  7 +-
 .../flex/reflection/beads/ClassAliasBead.as     | 94 ++++++++++++++++++++
 .../src/main/resources/basic-manifest.xml       | 26 ++++++
 6 files changed, 132 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea18dbda/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
 
b/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
index 296cc7c..203f678 100644
--- 
a/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
+++ 
b/frameworks/js/FlexJS/projects/ReflectionJS/src/main/config/compile-js-config.xml
@@ -64,6 +64,10 @@
         </library-path>
         
         <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                
<manifest>../../../../../../../projects/Reflection/src/main/resources/basic-manifest.xml</manifest>
+            </namespace>
         </namespaces>
         
         <source-path>
@@ -84,7 +88,8 @@
     </include-classes>
     
     <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
     </include-namespaces>
-        
+    
 
 </flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea18dbda/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassAliasBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassAliasBead.as 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassAliasBead.as
deleted file mode 100644
index 85ee702..0000000
--- 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassAliasBead.as
+++ /dev/null
@@ -1,91 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
-    COMPILE::SWF
-    {
-        import flash.net.registerClassAlias;
-        import flash.utils.getDefinitionByName;
-        
-        import org.apache.flex.events.Event;
-        import org.apache.flex.events.IEventDispatcher;
-        import org.apache.flex.events.ValueEvent;            
-    }
-    
-    /**
-     *  The ClassAliasBead class is the registers class
-     *  aliases for serialization/deserialization.
-     *  Place this bead in the strand of the Application.
-     *  The compiler leaves information about class aliases
-     *  on the Application's info object.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.0
-     */
-       public class ClassAliasBead implements IBead
-       {
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-               public function ClassAliasBead()
-               {
-               }
-               
-        private var _strand:IStrand;
-        
-        /**
-         *  @copy org.apache.flex.core.IBead#strand
-         *  
-         *  @flexjsignorecoercion org.apache.flex.core.IFlexInfo
-         *  @flexjsignorecoercion Class
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function set strand(value:IStrand):void
-        {
-            _strand = value;
-            COMPILE::SWF
-            {
-                var app:IFlexInfo = value as IFlexInfo;
-                var info:Object = app.info();
-                var map:Object = info.remoteClassAliases;
-                if (map)
-                {
-                    for (var cn:String in map)
-                    {
-                        var alias:String = map[cn];
-                        var c:Class = getDefinitionByName(cn) as Class;
-                        registerClassAlias(alias, c);
-                    }
-                }
-            }
-        }
-            
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea18dbda/frameworks/projects/Core/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/basic-manifest.xml 
b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
index ec18097..007c691 100644
--- a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -31,7 +31,6 @@
     <component id="SimpleStatesImpl" 
class="org.apache.flex.core.SimpleStatesImpl"/>
     <component id="MXMLDragInitiator" 
class="org.apache.flex.core.MXMLDragInitiator" />
     <component id="CallLaterBead" class="org.apache.flex.core.CallLaterBead" />
-    <component id="ClassAliasBead" class="org.apache.flex.core.ClassAliasBead" 
/>
 
     <component id="BindableCSSStyles" 
class="org.apache.flex.core.BindableCSSStyles"/>
     <component id="BindableCSSStylesWithFlex" 
class="org.apache.flex.core.BindableCSSStylesWithFlex"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea18dbda/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml 
b/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
index 69f20db..68a1d4f 100644
--- a/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
+++ b/frameworks/projects/Reflection/src/main/config/compile-swf-config.xml
@@ -63,6 +63,10 @@
         <library-path/>
 
         <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>../resources/basic-manifest.xml</manifest>
+            </namespace>
         </namespaces>
         
         <source-path>
@@ -78,8 +82,9 @@
     </include-sources>
     
     <include-namespaces>
+       <uri>library://ns.apache.org/flexjs/basic</uri>
     </include-namespaces>
-        
+     
     <target-player>${playerglobal.version}</target-player>
        
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea18dbda/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/beads/ClassAliasBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/beads/ClassAliasBead.as
 
b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/beads/ClassAliasBead.as
new file mode 100644
index 0000000..d0c6448
--- /dev/null
+++ 
b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/beads/ClassAliasBead.as
@@ -0,0 +1,94 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.reflection.beads
+{
+    COMPILE::SWF
+    {
+        import flash.net.registerClassAlias;
+        import flash.utils.getDefinitionByName;        
+    }
+    COMPILE::JS
+    {
+        import org.apache.flex.reflection.registerClassAlias;
+        import org.apache.flex.reflection.getDefinitionByName;        
+    }
+    
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IFlexInfo;
+    import org.apache.flex.core.IStrand;
+    
+    /**
+     *  The ClassAliasBead class is the registers class
+     *  aliases for serialization/deserialization.
+     *  Place this bead in the strand of the Application.
+     *  The compiler leaves information about class aliases
+     *  on the Application's info object.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       public class ClassAliasBead implements IBead
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function ClassAliasBead()
+               {
+               }
+               
+        private var _strand:IStrand;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *  
+         *  @flexjsignorecoercion org.apache.flex.core.IFlexInfo
+         *  @flexjsignorecoercion Class
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+            var app:IFlexInfo = value as IFlexInfo;
+            var info:Object = app.info();
+            var map:Object = info.remoteClassAliases;
+            if (map)
+            {
+                for (var cn:String in map)
+                {
+                    var alias:String = map[cn];
+                    var c:Class = getDefinitionByName(cn) as Class;
+                    if (c) // if no class, may have only been used in JS as a 
type and never actually instnatiated
+                        registerClassAlias(alias, c);
+                }
+            }
+        }
+            
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea18dbda/frameworks/projects/Reflection/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Reflection/src/main/resources/basic-manifest.xml 
b/frameworks/projects/Reflection/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..c816a34
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/resources/basic-manifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    <component id="ClassAliasBead" 
class="org.apache.flex.reflection.beads.ClassAliasBead" />
+    
+</componentPackage>

Reply via email to