You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by es...@apache.org on 2012/08/21 12:35:14 UTC

svn commit: r1375464 - in /incubator/flex/whiteboard/espenskogen/classloader: ./ src/main/flex/flex/ src/main/flex/org/ src/main/flex/org/apache/ src/main/flex/org/apache/flex/ src/main/flex/org/apache/flex/classloader/ src/main/flex/org/apache/flex/cl...

Author: espenskogen
Date: Tue Aug 21 10:35:13 2012
New Revision: 1375464

URL: http://svn.apache.org/viewvc?rev=1375464&view=rev
Log:
FLEX-33085 - Repackaged, and added appropriate apache license

Added:
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoader.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoader.as
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoaderEvent.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoaderEvent.as
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWCClassLoader.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWCClassLoader.as
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWFClassLoader.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWFClassLoader.as
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/util/
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/util/SWCExtractor.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/ClassLoaderTest.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/ClassLoaderTest.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClass.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/MockClass.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClassLoader.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCClassLoaderTest.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCClassLoaderTest.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCExtractorTest.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCExtractorTest.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWFClassLoaderTest.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWFClassLoaderTest.as
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/util/
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/util/SwcExtractorTest.as
      - copied, changed from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/util/SwcExtractorTest.as
Removed:
    incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/
    incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/
Modified:
    incubator/flex/whiteboard/espenskogen/classloader/pom.xml

Modified: incubator/flex/whiteboard/espenskogen/classloader/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/pom.xml?rev=1375464&r1=1375463&r2=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/pom.xml (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/pom.xml Tue Aug 21 10:35:13 2012
@@ -140,6 +140,18 @@
             <type>swc</type>
         </dependency>
 
+        <dependency>
+            <groupId>com.adobe.flexunit</groupId>
+            <artifactId>flexunit</artifactId>
+            <type>swc</type>
+        </dependency>
+
+        <dependency>
+            <groupId>hamcrest-as3</groupId>
+            <artifactId>hamcrest-as3</artifactId>
+            <type>swc</type>
+        </dependency>
+
     </dependencies>
 
 
@@ -307,6 +319,7 @@
                 <artifactId>flexunit</artifactId>
                 <version>4.1.0_RC2</version>
                 <type>swc</type>
+                <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>com.digitalprimates.fluint</groupId>

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoader.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoader.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoader.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoader.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoader.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoader.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoader.as Tue Aug 21 10:35:13 2012
@@ -1,409 +1,429 @@
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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.classloader
+{
+import flex.classloader.*;
+
+import flash.display.MovieClip;
+import flash.errors.IllegalOperationError;
+import flash.events.EventDispatcher;
+import flash.system.ApplicationDomain;
+import flash.utils.ByteArray;
+
+import mx.core.BitmapAsset;
+import mx.core.SoundAsset;
+import mx.core.SpriteAsset;
+import mx.logging.ILogger;
+import mx.logging.Log;
+
+[Event(name="loaded", type="org.apache.flex.classloader.ClassLoaderEvent")]
+[Event(name="error", type="flex.classloader..ClassLoaderEvent")]
+[Event(name="unloaded", type="org.apache.flex.classloader.ClassLoaderEvent")]
+
 /**
- *  CFPE
+ * Abstract base class for ClassLoaders.
+ *
+ * <p>Provides a Java style class loader hierarchy for dynamically loading Flex classes.</p>
+ * <p>Sub classes should implement <code>findClass</code>, <code>loadContainer</code> and <code>unloadContainer</code> at a minimum</p>
+ * @see http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/org.apache.flex.classloader.ClassLoader.html
  */
-package flex.classloader
+public class ClassLoader extends EventDispatcher
 {
-import classloader.*;
-    import flash.display.MovieClip;
-    import flash.errors.IllegalOperationError;
-    import flash.events.EventDispatcher;
-    import flash.system.ApplicationDomain;
-    import flash.utils.ByteArray;
+    /**
+     * The parent class loader
+     */
+    public function get parent():ClassLoader
+    {
+        return _parent;
+    }
+
+
+    /**
+     * Domain for the class loader
+     */
+    public function get domain():ApplicationDomain
+    {
+        return _domain;
+    }
 
-    import mx.core.BitmapAsset;
-    import mx.core.SoundAsset;
-    import mx.core.SpriteAsset;
-    import mx.logging.ILogger;
-    import mx.logging.Log;
 
-    [Event(name="loaded", type="flex.classloader.ClassLoaderEvent")]
-    [Event(name="error", type="flex.classloader..ClassLoaderEvent")]
-    [Event(name="unloaded", type="flex.classloader.ClassLoaderEvent")]
+    /**
+     * Has the dependency been loaded
+     */
+    public function get loaded():Boolean
+    {
+        return _loaded;
+    }
+
 
     /**
-     * Abstract base class for ClassLoaders.
-     *
-     * <p>Provides a Java style class loader hierarchy for dynamically loading Flex classes.</p>
-     * <p>Sub classes should implement <code>findClass</code>, <code>loadContainer</code> and <code>unloadContainer</code> at a minimum</p>
-     * @see http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/flex.classloader.ClassLoader.html
+     * Constructor
      */
-    public class ClassLoader extends EventDispatcher
+    public function ClassLoader(parent:ClassLoader = null, domain:ApplicationDomain = null)
     {
-        /**
-         * The parent class loader
-         */
-        public function get parent():ClassLoader
+        if (parent)
         {
-            return _parent;
+            _parent = parent;
         }
 
-
-        /**
-         * Domain for the class loader
-         */
-        public function get domain():ApplicationDomain
+        if (domain)
         {
-            return _domain;
+            this._domain = domain;
         }
-
-
-        /**
-         * Has the dependency been loaded
-         */
-        public function get loaded():Boolean
+        else if (parent)
         {
-            return _loaded;
+            this._domain = _parent._domain;
+        }
+        else
+        {
+            this._domain = new ApplicationDomain(ApplicationDomain.currentDomain);
         }
 
+    }
 
-        /**
-         * Constructor
-         */
-        public function ClassLoader(parent:ClassLoader = null, domain:ApplicationDomain = null)
-        {
-            if (parent)
-            {
-                _parent = parent;
-            }
 
-            if (domain)
-            {
-                this._domain = domain;
-            }
-            else if (parent)
-            {
-                this._domain = _parent._domain;
-            }
-            else
-            {
-                this._domain = new ApplicationDomain(ApplicationDomain.currentDomain);
-            }
+    /* PUBLIC */
 
-        }
 
+    /**
+     *  Load the classes from there container e.g. SWF/SWC etc
+     */
+    public function load():void
+    {
+        loadContainer();
+    }
 
-        /* PUBLIC */
 
+    /**
+     *  unload the classes from there container e.g. SWF/SWC etc
+     */
+    public function unload():void
+    {
+        unloadContainer();
+    }
 
-        /**
-         *  Load the classes from there container e.g. SWF/SWC etc
-         */
-        public function load():void
-        {
-            loadContainer();
-        }
 
+    /**
+     * Return a class definition
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     */
+    public function getClass(name:String):Class
+    {
+        var result:Class
 
-        /**
-         *  unload the classes from there container e.g. SWF/SWC etc
-         */
-        public function unload():void
+        try
         {
-            unloadContainer();
+            result = Class(lookupDefinition(name));
         }
-
-
-        /**
-         * Return a class definition
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         */
-        public function getClass(name:String):Class
+        catch (error:ReferenceError)
         {
-            var result:Class
+            throw new ReferenceError("Class definition '" + name + "' not found");
+        }
 
-            try
-            {
-                result = Class(lookupDefinition(name));
-            }
-            catch (error:ReferenceError)
-            {
-                throw new ReferenceError("Class definition '" + name + "' not found");
-            }
+        if (!result)
+        {
+            throw new ReferenceError("Class definition '" + name + "' not found");
+        }
 
-            if (!result)
-            {
-                throw new ReferenceError("Class definition '" + name + "' not found");
-            }
+        return result;
+    }
 
-            return result;
-        }
 
+    /**
+     * Return a function definition
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     */
+    public function getFunction(name:String):Function
+    {
+        var result:Function;
 
-        /**
-         * Return a function definition
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         */
-        public function getFunction(name:String):Function
+        try
         {
-            var result:Function;
-
-            try
+            result = lookupDefinition(name) as Function;
+        }
+        catch (error:ReferenceError)
+        {
+            if (error.message != "")
             {
-                result = lookupDefinition(name) as Function;
+                throw new ReferenceError("Function definition '" + name + "' not found in '" + error.message + "'");
             }
-            catch (error:ReferenceError)
+            else
             {
-                if (error.message != "")
-                {
-                    throw new ReferenceError("Function definition '" + name + "' not found in '" + error.message + "'");
-                }
-                else
-                {
-                    throw new ReferenceError("Function definition '" + name + "' not found");
-                }
+                throw new ReferenceError("Function definition '" + name + "' not found");
             }
-
-            return result;
         }
 
+        return result;
+    }
 
-        /**
-         * Return a namespace definition
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         */
-        public function getNamespace(name:String):Namespace
-        {
-            var result:Namespace;
 
-            try
-            {
-                result = Namespace(lookupDefinition(name));
-            }
-            catch (error:ReferenceError)
-            {
-                throw new ReferenceError("Namespace definition '" + name + "' not found");
-            }
+    /**
+     * Return a namespace definition
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     */
+    public function getNamespace(name:String):Namespace
+    {
+        var result:Namespace;
 
-            if (!result)
-            {
-                throw new ReferenceError("Namespace definition '" + name + "' not found");
-            }
+        try
+        {
+            result = Namespace(lookupDefinition(name));
+        }
+        catch (error:ReferenceError)
+        {
+            throw new ReferenceError("Namespace definition '" + name + "' not found");
+        }
 
-            return result;
+        if (!result)
+        {
+            throw new ReferenceError("Namespace definition '" + name + "' not found");
         }
 
+        return result;
+    }
 
-        /**
-         * Return a bitmap asset, from an embedded JPG, GIF or PNG
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         * @throws TypeError
-         */
-        public function getBitmapAsset(name:String):BitmapAsset
-        {
-            const LoadedBitmapAssetClass:Class = getClass(name);
-            var bitmapAsset:BitmapAsset;
 
-            try
-            {
-                bitmapAsset = new LoadedBitmapAssetClass();
-                return bitmapAsset;
-            }
-            catch (error:Error)
-            {
-                throw new TypeError(name + " is not a Bitmap Asset");
-            }
+    /**
+     * Return a bitmap asset, from an embedded JPG, GIF or PNG
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     * @throws TypeError
+     */
+    public function getBitmapAsset(name:String):BitmapAsset
+    {
+        const LoadedBitmapAssetClass:Class = getClass(name);
+        var bitmapAsset:BitmapAsset;
 
-            return null;
+        try
+        {
+            bitmapAsset = new LoadedBitmapAssetClass();
+            return bitmapAsset;
+        }
+        catch (error:Error)
+        {
+            throw new TypeError(name + " is not a Bitmap Asset");
         }
 
+        return null;
+    }
 
-        /**
-         * Return a sprite asset, from an embedded SVG image
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         * @throws TypeError
-         */
-        public function getSpriteAsset(name:String):SpriteAsset
-        {
-            const LoadedSpriteAssetClass:Class = getClass(name);
-            var spriteAsset:SpriteAsset;
 
-            try
-            {
-                spriteAsset = new LoadedSpriteAssetClass();
-                return spriteAsset;
-            }
-            catch (error:Error)
-            {
-                throw new TypeError(name + " is not a Sprite Asset");
-            }
+    /**
+     * Return a sprite asset, from an embedded SVG image
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     * @throws TypeError
+     */
+    public function getSpriteAsset(name:String):SpriteAsset
+    {
+        const LoadedSpriteAssetClass:Class = getClass(name);
+        var spriteAsset:SpriteAsset;
 
-            return null;
+        try
+        {
+            spriteAsset = new LoadedSpriteAssetClass();
+            return spriteAsset;
+        }
+        catch (error:Error)
+        {
+            throw new TypeError(name + " is not a Sprite Asset");
         }
 
+        return null;
+    }
 
-        /**
-         * Return a sound asset, from an embedded MP3
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         * @throws TypeError
-         */
-        public function getSoundAsset(name:String):SoundAsset
-        {
-            const LoadedSoundAssetClass:Class = getClass(name);
-            var soundAsset:SoundAsset;
 
-            try
-            {
-                soundAsset = new LoadedSoundAssetClass();
-                return soundAsset;
-            }
-            catch (error:Error)
-            {
-                throw new TypeError(name + " is not a Sound Asset");
-            }
+    /**
+     * Return a sound asset, from an embedded MP3
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     * @throws TypeError
+     */
+    public function getSoundAsset(name:String):SoundAsset
+    {
+        const LoadedSoundAssetClass:Class = getClass(name);
+        var soundAsset:SoundAsset;
 
-            return null;
+        try
+        {
+            soundAsset = new LoadedSoundAssetClass();
+            return soundAsset;
+        }
+        catch (error:Error)
+        {
+            throw new TypeError(name + " is not a Sound Asset");
         }
 
+        return null;
+    }
 
-        /**
-         * Return a Movie Clip asset, from an embedded SWF
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         * @throws TypeError
-         */
-        public function getMovieClipAsset(name:String):MovieClip
-        {
-            const LoadedMovieClipClass:Class = getClass(name);
-            var moveClip:MovieClip;
 
-            try
-            {
-                moveClip = new LoadedMovieClipClass();
-                return moveClip;
-            }
-            catch (error:Error)
-            {
-                throw new TypeError(name + " is not a MovieClip Asset");
-            }
+    /**
+     * Return a Movie Clip asset, from an embedded SWF
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     * @throws TypeError
+     */
+    public function getMovieClipAsset(name:String):MovieClip
+    {
+        const LoadedMovieClipClass:Class = getClass(name);
+        var moveClip:MovieClip;
 
-            return null;
+        try
+        {
+            moveClip = new LoadedMovieClipClass();
+            return moveClip;
+        }
+        catch (error:Error)
+        {
+            throw new TypeError(name + " is not a MovieClip Asset");
         }
 
+        return null;
+    }
 
-        /**
-         * Return a ByteArray asset, from an embedded binary asset
-         *
-         * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
-         *
-         * @throws ReferenceError
-         * @throws TypeError
-         */
-        public function getByteArrayAsset(name:String):ByteArray
-        {
-            const LoadedByteArrayAssetClass:Class = getClass(name);
-            var byteArrayAsset:ByteArray;
 
-            try
-            {
-                byteArrayAsset = new LoadedByteArrayAssetClass();
-                return byteArrayAsset;
-            }
-            catch (error:Error)
-            {
-                throw new TypeError(name + " is not a ByteArray Asset");
-            }
+    /**
+     * Return a ByteArray asset, from an embedded binary asset
+     *
+     * <p>Because Flex Loaders are asynchronous, this method must be called after the ClassLoader as finished loading the class container e.g. SWF/SWC etc from a call to load()</p>
+     *
+     * @throws ReferenceError
+     * @throws TypeError
+     */
+    public function getByteArrayAsset(name:String):ByteArray
+    {
+        const LoadedByteArrayAssetClass:Class = getClass(name);
+        var byteArrayAsset:ByteArray;
 
-            return null;
+        try
+        {
+            byteArrayAsset = new LoadedByteArrayAssetClass();
+            return byteArrayAsset;
+        }
+        catch (error:Error)
+        {
+            throw new TypeError(name + " is not a ByteArray Asset");
         }
 
+        return null;
+    }
 
-        /* PROTECTED */
 
+    /* PROTECTED */
 
-        protected var _parent:ClassLoader;
 
-        protected var _domain:ApplicationDomain
+    protected var _parent:ClassLoader;
 
-        protected var _loaded:Boolean = false;
+    protected var _domain:ApplicationDomain
 
+    protected var _loaded:Boolean = false;
 
-        /**
-         * Load the classes from there container e.g. SWF/SWC etc
-         */
-        protected function loadContainer():void
-        {
-            throw new IllegalOperationError("Must be overridden");
-        }
 
+    /**
+     * Load the classes from there container e.g. SWF/SWC etc
+     */
+    protected function loadContainer():void
+    {
+        throw new IllegalOperationError("Must be overridden");
+    }
 
-        /**
-         *  UnLoad the classes from there container e.g. SWF/SWC etc
-         */
-        protected function unloadContainer():void
-        {
-            throw new IllegalOperationError("Must be overridden");
-        }
 
+    /**
+     *  UnLoad the classes from there container e.g. SWF/SWC etc
+     */
+    protected function unloadContainer():void
+    {
+        throw new IllegalOperationError("Must be overridden");
+    }
 
-        /**
-         * Find a definition form the container, and return it
-         *
-         * @throws ReferenceError
-         */
-        protected function findDefinition(name:String):Object
-        {
-            throw new IllegalOperationError("Must be overridden");
-        }
 
+    /**
+     * Find a definition form the container, and return it
+     *
+     * @throws ReferenceError
+     */
+    protected function findDefinition(name:String):Object
+    {
+        throw new IllegalOperationError("Must be overridden");
+    }
 
-        /* PRIVATE */
 
-        private static const logger:ILogger = Log.getLogger("com.jpmorgan.ib.cfpe.classloader.ClassLoader");
+    /* PRIVATE */
 
-        /**
-         * Lookup the definition form the ClassLoader hierarchy
-         */
-        private function lookupDefinition(name:String):Object
-        {
-            var definition:Object;
+    private static const logger:ILogger = Log.getLogger("com.jpmorgan.ib.cfpe.classloader.ClassLoader");
 
-            if (_domain && _domain.hasDefinition(name))
-            {
-                definition = _domain.getDefinition(name);
-            }
-            else
+    /**
+     * Lookup the definition form the ClassLoader hierarchy
+     */
+    private function lookupDefinition(name:String):Object
+    {
+        var definition:Object;
+
+        if (_domain && _domain.hasDefinition(name))
+        {
+            definition = _domain.getDefinition(name);
+        }
+        else
+        {
+            try
             {
-                try
+                if (_parent)
                 {
-                    if (_parent)
-                    {
-                        definition = _parent.getClass(name);
-                    }
-                }
-                catch (error:ReferenceError)
-                {
-                    definition = findDefinition(name);
+                    definition = _parent.getClass(name);
                 }
             }
-
-            if (!_parent)
+            catch (error:ReferenceError)
             {
                 definition = findDefinition(name);
             }
+        }
 
-            logger.info("lookupDefinition: Looked up definition for {0}: {1}", name, definition);
-
-            return definition;
+        if (!_parent)
+        {
+            definition = findDefinition(name);
         }
+
+        logger.info("lookupDefinition: Looked up definition for {0}: {1}", name, definition);
+
+        return definition;
     }
 }
+}

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoaderEvent.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoaderEvent.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoaderEvent.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoaderEvent.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoaderEvent.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/ClassLoaderEvent.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/ClassLoaderEvent.as Tue Aug 21 10:35:13 2012
@@ -1,7 +1,26 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
 import flash.events.Event;
 

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWCClassLoader.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWCClassLoader.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWCClassLoader.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWCClassLoader.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWCClassLoader.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWCClassLoader.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWCClassLoader.as Tue Aug 21 10:35:13 2012
@@ -1,12 +1,27 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
-{
-import classloader.*;
 
-import com.jpmorgan.ib.cfpe.classloader.util.SwcExtractor;
 
+package org.apache.flex.classloader
+{
 import flash.display.Loader;
 import flash.events.Event;
 import flash.events.IOErrorEvent;
@@ -18,6 +33,8 @@ import flash.system.ApplicationDomain;
 import flash.system.LoaderContext;
 import flash.utils.ByteArray;
 
+import org.apache.flex.classloader.util.SWCExtractor;
+
 /**
  * Implements a Class Loader which loads Classes within a SWC container from a URL
  *
@@ -127,7 +144,7 @@ public class SWCClassLoader extends Clas
     protected function completeHandler(event:Event):void
     {
         // Extract SWF library
-        const extractor:SwcExtractor = new SwcExtractor(loader.data);
+        const extractor:SWCExtractor = new SWCExtractor(loader.data);
         const swfData:ByteArray = extractor.extract("library.swf");
 
         // Load the SWF

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWFClassLoader.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWFClassLoader.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWFClassLoader.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWFClassLoader.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWFClassLoader.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/flex/classloader/SWFClassLoader.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/SWFClassLoader.as Tue Aug 21 10:35:13 2012
@@ -1,11 +1,31 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
-import classloader.*;
+import flex.classloader.*;
 
 import flash.display.Loader;
+
 import flash.events.Event;
 import flash.events.IOErrorEvent;
 import flash.events.SecurityErrorEvent;

Added: incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/util/SWCExtractor.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/util/SWCExtractor.as?rev=1375464&view=auto
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/util/SWCExtractor.as (added)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/main/flex/org/apache/flex/classloader/util/SWCExtractor.as Tue Aug 21 10:35:13 2012
@@ -0,0 +1,207 @@
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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.
+ * //
+ * ////////////////////////////////////////////////////////////////////////////////
+ */
+
+/**
+ *  CFPE
+ */
+package org.apache.flex.classloader.util
+{
+import flash.utils.ByteArray;
+import flash.utils.Endian;
+
+/**
+ * Util to extract files from a SWC library
+ *
+ * @see http://www.pkware.com/documents/casestudies/APPNOTE.TXT
+ */
+public class SWCExtractor
+{
+
+    /**
+     * Constructor
+     */
+    public function SWCExtractor(content:ByteArray)
+    {
+        this.content = content;
+    }
+
+
+    /**
+     * Extract a file form the SWC
+     *
+     * @param name Filename to extract
+     */
+    public function extract(name:String):ByteArray
+    {
+        content.endian = Endian.LITTLE_ENDIAN;
+        content.position = 0;
+
+        var bytes:ByteArray = new ByteArray();
+        bytes.endian = Endian.LITTLE_ENDIAN;
+
+
+        while (content.bytesAvailable)
+        {
+            // read fixed metadata portion of local file header
+            var fileHeader:FileHeader = readHeader(content);
+
+            // Not a file or end of SWC content
+            if (!fileHeader)
+            {
+                break;
+            }
+
+            // read compressed file to offset 0 of bytes; for uncompressed files
+            if (fileHeader.compressedSize != 0)
+            {
+                content.readBytes(bytes, 0, fileHeader.compressedSize);
+            }
+            else if (fileHeader.uncompressedSize != 0)
+            {
+                content.readBytes(bytes, 0, fileHeader.uncompressedSize);
+            }
+            else // need to scan :-(
+            {
+                if (!scanForFileContent(bytes, content))
+                {
+                    break; // no content found
+                }
+            }
+
+            if (fileHeader.filename == name)   // Got a match
+            {
+                // Decompress
+                if (fileHeader.compressionMethod == 8)
+                {
+                    bytes.inflate();
+                }
+
+                return bytes;
+            }
+        }
+
+        return null;
+    }
+
+
+    /* PRIVATE */
+
+    private var content:ByteArray;
+
+    private static const HEADER_SIGNATURE_BYTE:uint = 0x50;
+    private static const FILE_HEADER_SIGNATURE:uint = 0x04034b50;
+    private static const FILE_DATA_DESCRIPTOR_SIGNATURE:uint = 0x08074B50;
+
+
+    /**
+     * Read a File Header from the SWC content
+     *
+     * <p><code>content</code> ByteArray position must be at the beginning of a header</p>
+     */
+    private function readHeader(content:ByteArray):FileHeader
+    {
+        var bytes:ByteArray = new ByteArray();
+        bytes.endian = Endian.LITTLE_ENDIAN;
+
+        var fileHeader:FileHeader = new FileHeader();
+        var offset:int;
+
+        content.readBytes(bytes, 0, 30);
+        bytes.position = 0;
+
+        fileHeader.signature = bytes.readInt();
+        if (fileHeader.signature != FILE_HEADER_SIGNATURE)
+        {
+            return null;
+        }
+
+        bytes.position = 8;
+        fileHeader.compressionMethod = bytes.readByte();  // store compression method (8 == Deflate)
+
+        bytes.position = 18;
+        fileHeader.compressedSize = bytes.readUnsignedInt();  // store size of compressed portion
+        bytes.position = 22;  // offset to uncompressed size
+        fileHeader.uncompressedSize = bytes.readUnsignedInt();  // store uncompressed size
+
+        offset = 0;    // stores length of variable portion of metadata
+        bytes.position = 26;  // offset to file name length
+        fileHeader.fileNameLength = bytes.readShort();    // store file name
+        offset += fileHeader.fileNameLength;     // add length of file name
+        bytes.position = 28;    // offset to extra field length
+        fileHeader.extraFieldLength = bytes.readShort();
+        offset += fileHeader.extraFieldLength;    // add length of extra field
+
+        content.readBytes(bytes, 30, offset);
+        bytes.position = 30;
+        fileHeader.filename = bytes.readUTFBytes(fileHeader.fileNameLength); // read file name
+
+        return fileHeader;
+    }
+
+
+    /**
+     *  Scan the SWC content <code>source</code> for a files content and push into <code>content</code>
+     *
+     *  @return size of content
+     */
+    private function scanForFileContent(content:ByteArray, source:ByteArray):int
+    {
+        const contentPosition:uint = source.position;
+
+        while (source.bytesAvailable)
+        {
+            if (source.readUnsignedByte() == HEADER_SIGNATURE_BYTE)
+            {
+                source.position--;
+                if (source.readInt() == FILE_DATA_DESCRIPTOR_SIGNATURE)
+                {
+                    const size:uint = source.position - contentPosition - 4;
+                    source.position = contentPosition;
+                    source.readBytes(content, 0, size);
+
+                    source.position += 16;    // Skip Data Descriptor
+                    break;
+                }
+            }
+        }
+
+        return size;
+    }
+
+}
+}
+
+
+/**
+ * Private Class defining the zip file header
+ *
+ * @see http://www.pkware.com/documents/casestudies/APPNOTE.TXT
+ */
+class FileHeader
+{
+    public var signature:int;
+    public var compressionMethod:int;
+    public var fileNameLength:int;
+    public var extraFieldLength:int;
+    public var filename:String;
+    public var compressedSize:uint;
+    public var uncompressedSize:uint;
+}
\ No newline at end of file

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/ClassLoaderTest.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/ClassLoaderTest.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/ClassLoaderTest.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/ClassLoaderTest.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/ClassLoaderTest.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/ClassLoaderTest.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/ClassLoaderTest.as Tue Aug 21 10:35:13 2012
@@ -1,10 +1,33 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
+import flex.classloader.*;
+
 import flash.system.ApplicationDomain;
 
+import org.apache.flex.classloader.ClassLoader;
+
 import org.flexunit.asserts.assertEquals;
 import org.flexunit.asserts.assertNotNull;
 import org.flexunit.asserts.assertNull;

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClass.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/MockClass.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClass.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClass.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/MockClass.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/MockClass.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClass.as Tue Aug 21 10:35:13 2012
@@ -1,7 +1,26 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
 /**
  *  Mock Class to load

Added: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClassLoader.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClassLoader.as?rev=1375464&view=auto
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClassLoader.as (added)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/MockClassLoader.as Tue Aug 21 10:35:13 2012
@@ -0,0 +1,66 @@
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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.classloader
+{
+import flash.system.ApplicationDomain;
+
+import org.apache.flex.classloader.ClassLoader;
+
+/**
+ * Simple Class Loader Mock, to test abstract functions
+ */
+public class MockClassLoader extends ClassLoader
+{
+    /**
+     * Constructor
+     */
+    public function MockClassLoader(parent:ClassLoader = null, domain:ApplicationDomain = null)
+    {
+        super(parent, domain);
+    }
+
+
+    /**
+     * Load the classes from there container e.g. SWF/SWC etc
+     */
+    override protected function loadContainer():void
+    {
+
+    }
+
+
+    /**
+     * Find a class form the container, and return it
+     *
+     * @throws ReferenceError
+     */
+    override protected function findDefinition(name:String):Object
+    {
+        if (name == "com.jpmorgan.ib.cfpe.classloader.MockClass")
+            return MockClass;
+        else
+            throw new ReferenceError();
+    }
+
+}
+}

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCClassLoaderTest.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCClassLoaderTest.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCClassLoaderTest.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCClassLoaderTest.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCClassLoaderTest.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCClassLoaderTest.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCClassLoaderTest.as Tue Aug 21 10:35:13 2012
@@ -1,12 +1,34 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
 import flash.utils.getTimer;
 
 import mx.core.BitmapAsset;
 
+import org.apache.flex.classloader.ClassLoader;
+import org.apache.flex.classloader.ClassLoaderEvent;
+
 import org.flexunit.asserts.assertEquals;
 import org.flexunit.async.Async;
 

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCExtractorTest.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCExtractorTest.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCExtractorTest.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCExtractorTest.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCExtractorTest.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWCExtractorTest.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWCExtractorTest.as Tue Aug 21 10:35:13 2012
@@ -1,7 +1,26 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
 import flash.events.Event;
 import flash.net.URLLoader;
@@ -9,6 +28,8 @@ import flash.net.URLLoaderDataFormat;
 import flash.net.URLRequest;
 import flash.utils.ByteArray;
 
+import org.apache.flex.classloader.util.SWCExtractor;
+
 import org.flexunit.asserts.assertTrue;
 import org.flexunit.async.Async;
 
@@ -48,7 +69,7 @@ public class SWCExtractorTest
 
         Async.handleEvent(this, loader, Event.COMPLETE, function ():void
         {
-            const swcExtractor:SwcExtractor = new SwcExtractor(ByteArray(loader.data));
+            const swcExtractor:SWCExtractor = new SWCExtractor(ByteArray(loader.data));
 
             const swfData:ByteArray = swcExtractor.extract("library.swf");
         });
@@ -64,7 +85,7 @@ public class SWCExtractorTest
 
         Async.handleEvent(this, loader, Event.COMPLETE, function ():void
         {
-            const swcExtractor:SwcExtractor = new SwcExtractor(ByteArray(loader.data));
+            const swcExtractor:SWCExtractor = new SWCExtractor(ByteArray(loader.data));
 
             const swfData:ByteArray = swcExtractor.extract("catalog.xml");
         });

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWFClassLoaderTest.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWFClassLoaderTest.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWFClassLoaderTest.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWFClassLoaderTest.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWFClassLoaderTest.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/SWFClassLoaderTest.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/SWFClassLoaderTest.as Tue Aug 21 10:35:13 2012
@@ -1,12 +1,34 @@
-/**
- *  CFPE
+/*
+ * ////////////////////////////////////////////////////////////////////////////////
+ * //
+ * //  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 flex.classloader
+
+
+package org.apache.flex.classloader
 {
 import flash.system.ApplicationDomain;
 
 import mx.core.BitmapAsset;
 
+import org.apache.flex.classloader.ClassLoader;
+import org.apache.flex.classloader.ClassLoaderEvent;
+
 import org.flexunit.asserts.assertEquals;
 import org.flexunit.asserts.assertFalse;
 import org.flexunit.async.Async;

Copied: incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/util/SwcExtractorTest.as (from r1375432, incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/util/SwcExtractorTest.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/util/SwcExtractorTest.as?p2=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/util/SwcExtractorTest.as&p1=incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/util/SwcExtractorTest.as&r1=1375432&r2=1375464&rev=1375464&view=diff
==============================================================================
--- incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/flex/classloader/util/SwcExtractorTest.as (original)
+++ incubator/flex/whiteboard/espenskogen/classloader/src/test/flex/org/apache/flex/classloader/util/SwcExtractorTest.as Tue Aug 21 10:35:13 2012
@@ -1,7 +1,5 @@
-/**
- *  CFPE
- */
-package flex.classloader.util
+
+package org.apache.flex.classloader.util
 {
 import flash.events.Event;
 import flash.net.URLLoader;
@@ -48,7 +46,7 @@ public class SwcExtractorTest
 
         Async.handleEvent(this, loader, Event.COMPLETE, function ():void
         {
-            const swcExtractor:SwcExtractor = new SwcExtractor(ByteArray(loader.data));
+            const swcExtractor:SWCExtractor = new SWCExtractor(ByteArray(loader.data));
 
             const swfData:ByteArray = swcExtractor.extract("library.swf");
         });
@@ -64,7 +62,7 @@ public class SwcExtractorTest
 
         Async.handleEvent(this, loader, Event.COMPLETE, function ():void
         {
-            const swcExtractor:SwcExtractor = new SwcExtractor(ByteArray(loader.data));
+            const swcExtractor:SWCExtractor = new SWCExtractor(ByteArray(loader.data));
 
             const swfData:ByteArray = swcExtractor.extract("catalog.xml");
         });