# Generate code that initialize the attributes on a new instance
fun generate_init_attr(v: JavaCompilerVisitor, recv: RuntimeVariable, mtype: MClassType) do
var cds = mtype.collect_mclassdefs(v.compiler.mainmodule).to_a
v.compiler.mainmodule.linearize_mclassdefs(cds)
for cd in cds do
for npropdef in v.compiler.modelbuilder.collect_attr_propdef(cd) do
npropdef.init_expr(v, recv)
end
end
end
src/compiler/java_compiler.nit:954,2--963,4