 
 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
-import flash.system.ApplicationDomain;
-import flash.utils.getQualifiedClassName;
-import flash.utils.getQualifiedSuperclassName;
+import flash.utils.describeType;
 
 import mx.core.ApplicationGlobals;
 import mx.core.FlexVersion;

import mx.modules.ModuleManager;
import mx.styles.IStyleClient;
import mx.styles.StyleProxy;
import mx.utils.OrderedObject;

use namespace mx_internal;

[ExcludeClass]


     */
    public static function getClassStyleDeclarations(object:IStyleClient):Array
    {
        var className:String = object.className;
        var advancedObject:IAdvancedStyleClient = object as IAdvancedStyleClient;

        var typeHierarchy:OrderedObject = getUnqualifiedTypeHierarchy(object);
        var types:Array = typeHierarchy.propertyList;
        var typeCount:int = types.length;
        var classDecls:Array = null;

        if (!StyleManager.hasAdvancedSelectors())
        {
            classDecls = StyleManager.typeSelectorCache[className];
            if (classDecls)
                return classDecls;
        }

        classDecls = [];

        // Loop over the type hierarhcy starting at the base type and work
        // down the chain of subclasses.
        for (var i:int = typeCount - 1; i >= 0; i--)
        {
            var type:String = types[i].toString();
            if (StyleManager.hasAdvancedSelectors() && advancedObject != null)
            {
                var decls:Object = StyleManager.getStyleDeclarations(type);
                if (decls)
                {
                    var matchingDecls:Array = getMatchingStyleDeclarations(decls, advancedObject);
                    classDecls = classDecls.concat(matchingDecls);
                }
            }
            else
            {
                var decl:CSSStyleDeclaration = StyleManager.getStyleDeclaration(type);
                if (decl)
                    classDecls.push(decl);
            }
        }

        if (StyleManager.hasAdvancedSelectors() && advancedObject != null)
        {        
            // Advanced selectors may mean more than one match per type so we
            // sort based on specificity, but preserving the declaration
            // order for equal selectors.
            classDecls = sortOnSpecificity(classDecls);
        }
        else
        {
            // Cache the simple type declarations for this class 
            StyleManager.typeSelectorCache[className] = classDecls;
        }

        return classDecls;
    }

    /**
