class foo { this ( foo p /* , other params */ ) { parent = p; } foo create() { return new foo(this); } void use() { foo f = create(); } foo parent; }