 
 import dolly.core.dolly_internal;
 import dolly.core.metadata.MetadataName;
+
+import flash.utils.Dictionary;
 
 import org.as3commons.reflect.Accessor;
 import org.as3commons.reflect.AccessorAccess;


public class Copier {

	private static function getCopyableFieldsOfType(type:Type):Vector.<Field> {
		const result:Vector.<Field> = new Vector.<Field>();

		var variable:Variable;

		const isTypeCloneable:Boolean = type.hasMetadata(MetadataName.COPYABLE);
		if (isTypeCloneable) {
			for each(variable in type.variables) {
				if (!foundFieldsMap[variable.name] && !variable.isStatic) {
					foundFieldsMap[variable.name] = variable;
					result.push(variable);
				}
			}
			for each(accessor in type.accessors) {
				if (!foundFieldsMap[accessor.name]
						&& !accessor.isStatic
						&& accessor.access == AccessorAccess.READ_WRITE) {
					foundFieldsMap[accessor.name] = accessor;
					result.push(accessor);
				}
			}
