             classInitializer.initializeClass()
         }
 
-        //print(self)
-    }
-    
+        print(self)
+    }
+
+    private func analyzeProperty(name : String, value: Any, index : Int, overallIndex : Int) -> AttributeDescriptor {
+        let mirror : Mirror  = Mirror(reflecting: value)
+        var type = mirror.subjectType
+        var optional = false
+        var elementType : Any.Type? = nil
+        var factory : Factory = {fatalError("no factory implemented")}
+
+        // what the hell?
+
+        if let optionalType = value as? OptionalType {
+            type = optionalType.wrappedType()
+            optional = true
+        }
+
+        if let array = value as? ArrayType {
+            elementType = array.elementType()
+            factory = array.factory()
+        }
+
+        return AttributeDescriptor(bean: self, name: name, index: index, overallIndex: overallIndex, type: type, elementType: elementType, factory: factory, optional: optional)
+    }
+
     // MARK: public
     
     public func getBeanClass() -> AnyClass {
         return clazz
+    }
+
+    public func getSuperBean() -> BeanDescriptor? {
+        return superBean
+    }
+
+    public func getSubBeans() -> [BeanDescriptor] {
+        return directSubBeans
     }
     
     public func create() throws -> AnyObject {

    
    private static var beans = IdentityMap<AnyObject, BeanDescriptor>();

    private static var SWIFT_OBJECT_CLASS : AnyClass = try! Classes.class4Name("SwiftObject")
    
    // MARK: class methods
    
    ///Return the
    /// - Parameter clazz: the corresponding class
    ///
    /// - Returns: the `BeanDescriptor` instance for the particular class
    public class func forClass(clazz: AnyClass) throws -> BeanDescriptor {
        if let bean = beans[clazz] {
            return bean;
        }
        else {
            let bean = BeanDescriptor(clazz: clazz);
            
            beans[clazz] = bean;
            
            try bean.analyze()
            
            return bean;
        }
    }
    
    public class func forClass(clazz: String) throws -> BeanDescriptor {
        return try forClass(try Classes.class4Name(clazz))
    }
    
    // MARK: inner classes
    
    public class PropertyDescriptor : CustomStringConvertible {

    
    // MARK: constructor
    
    init(clazz: AnyClass) throws {
        self.clazz = clazz

        // register

        BeanDescriptor.beans[clazz] = self

        // and analyze

        let instance = try createInstance4(clazz)

        try analyze(Mirror(reflecting: instance), instance: instance)
    }

    init(instance: AnyObject, mirror : Mirror? = nil) throws {
        let _mirror = mirror != nil ? mirror! : Mirror(reflecting: instance)

        self.clazz = _mirror.subjectType as! AnyClass

        print(self.clazz)

        // register

        BeanDescriptor.beans[clazz] = self

        // and analyze

        try analyze(_mirror, instance: instance)
    }
    
    // private
    
    private func analyze(mirror : Mirror, instance : AnyObject) throws {
        // check super mirror

        if let superMirror = mirror.superclassMirror() {
            if let superClass = superMirror.subjectType as? AnyClass {
                superBean = BeanDescriptor.beans[superClass] != nil ?  BeanDescriptor.beans[superClass]  : try BeanDescriptor(instance: instance, mirror: superMirror)

                superBean!.directSubBeans.append(self)

                // add inherited properties

                for property in superBean!.allProperties {
                    allProperties.append(property)

                    properties[property.name] = property;
                }
            }
            else {
                // hmmm....what could this be?
            }
        }

        // local stuff

        var startIndex = properties.count

        // analyze properties

        if let displayStyle = mirror.displayStyle {
            if displayStyle == .Class {
                // analyze properties
