dox icon indicating copy to clipboard operation
dox copied to clipboard

Interfaces documentation

Open ncannasse opened this issue 4 years ago • 4 comments

Hi,

I noticed that interface fields are duplicated on the class implementation, see for instance interface here: https://heaps.io/api/hxd/fs/FileSystem.html and implementation there: https://heaps.io/api/hxd/fs/BytesFileSystem.html

I think we should only list the methods/vars that have different signature - the way we do already with subclass overrides - as the implementation is most likely shared.

ncannasse avatar Feb 13 '21 10:02 ncannasse

That seems questionable. The class has these methods and I don't see why the fact that one of its interfaces requires them would make them disappear from the documentation.

Simn avatar Feb 13 '21 10:02 Simn

I don't think hiding them would be a good decision. However I would say that having an interface mark on those may be useful, as well as (if it's not already implemented) them inheriting the docs from interface if there's no customized documentation present.

Yanrishatum avatar Feb 13 '21 10:02 Yanrishatum

I mean we can hide them if they have no documentation. It's exactly the same as we do for overriden methods so I don't see why we would not to this for implemented methods as well.

ncannasse avatar Feb 13 '21 10:02 ncannasse

I'm telling that from a documentation point of view : an interface is a specification, and the class implementing it respects this specification and most likely does not have any specific documentation to add compared to what's in the interface.

Another solution is to list them but with the interface documentation if the interface is documented and the the class isn't

ncannasse avatar Feb 13 '21 10:02 ncannasse