if (aliasedClass != null)
type = aliasedClass;
if (type == null || type.length() == 0)
{
object = new ASObject();
}
else if (type.startsWith(">")) // Handle [RemoteClass] (no server alias)
{
object = new ASObject();
((ASObject)object).setType(type);
}
else if (context.instantiateTypes || type.startsWith("flex."))
{
Class desiredClass = AbstractProxy.getClassFromClassName(type);
proxy = PropertyProxyRegistry.getRegistry().getProxyAndRegister(desiredClass);
if (proxy == null)
object = ClassUtil.createDefaultInstance(desiredClass, null);
else
object = proxy.createInstance(type);
}
else
{
// Just return type info with an ASObject...
object = new ASObject();
((ASObject)object).setType(type);
}
}
else
{
// TODO: QUESTION: Pete, Investigate why setValue for ASObject is delayed to endObject
object = new ASObject(type);
}
if (proxy == null)
proxy = PropertyProxyRegistry.getProxyAndRegister(object);