I want to create an instance of a subclass from inside a static superclass method. H开发者_如何学编程ere is an example:
class Base
{
public static function createSubclassInstance()
{
//What do I do here?
return new this.getSubclassType();
}
}
class Sub extends Base
{
}
I want to create a new Sub
instance by calling:
var s:Sub = Sub.createSubclassInstance();
static properties aren't inherited
精彩评论