I have following functional hierarchy which I’m recreating in Java:
Diagram
|
|--Model
|
|--Entity
All those object share some common properties (id, name) and also an reference to parent object in hierarchy. So I have implemented an abstract class:
abstract class DBObject{
private final int id;
private final String name;
private final DBObject parent;
//constructors, getters, setters here
/**
* @return reference to parent object in hierarchy.
*/
public final getParent(){
return parent;
}
}
So far no problem. The thing is, that Diagram has no parent and will always return null. This is ensured by implementation. But I would like to reflect the “parent always null” in Diagram Javadoc.
Is it possible to overload Javadoc, without overriding method? Solution would be to state that in abstract class as a note, but that’s no an answer I’m looking for.
Thanks.
How about this?