Open Zegveld opened 11 months ago
Possible solutions:
addExtendedField()
in the Parent, this would become something like: addExtendedFieldToFields()
To<collectionForSeeAlso>
Thinking about going for option 3. Using a list of example methods to determine what reads better.
Using classes:
@SeeAlso( Child.class )
class Person {
// fields
}
class Child extends Person {
// fields
}
class Parent {
Collection<Person> children;
}
in the ParentBuilder
, besides the PersonBuilder<...> addChildren()
method how would the see also annotated fields called:
ChildBuilder<...> addChildInChildren()
parentBuilder.addChildInChildren()/* fill child fields */.end() // back to parentBuilder
ChildBuilder<...> addChildToChildren()
parentBuilder.addChildToChildren()/* fill child fields */.end() // back to parentBuilder
ChildBuilder<...> addChildInsideChildren()
parentBuilder.addChildInsideChildren()/* fill child fields */.end() // back to parentBuilder
ChildBuilder<...> addChildToChildrenCollection()
parentBuilder.addChildToChildrenCollection()/* fill child fields */.end() // back to parentBuilder
Given the following situation the resulting code does not compile because of overlap between own and inherited methods.
currently generated code: