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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -