var m : new Model; | |
m.name = "m"; | |
// Create five packages | |
for (i in 1.to(5)){ | |
var package : Package = new Package; | |
package.name = "p" + i; | |
package.package = m; | |
// Create three classes in each package | |
for (j in 1.to(3)) { | |
var class : Class = new Class; | |
class.name = "c" + i + "" + j; | |
class.isAbstract = false; | |
class.package = package; | |
} | |
} | |
// Assign random supertypes to the classes created | |
for (c in Class.allInstances) { | |
c.extends = Class.allInstances.random(); | |
} |