class reflection in adobe flex -
i java programmer learning adobe flex.
is possible kinds of reflection can in java (get constructors of class, parameter list of constructor, invoke constructor given set of parameters) in flex?
if so, can point me example?
you can instantiate class in way
var classn:class = getdefinitionbyname("package.goes.here::classname") class; var instanceclass:object = new classn(); use describetype access properties
var sourceinfo:xml = describetype(instanceclass); var objectproperty:xml; var propertyname:string; //loop through accessors each(objectproperty in sourceinfo.accessor) { if(objectproperty.@access == "readwrite") { propertyname = objectproperty.@name; //do } }
Comments
Post a Comment