Hello, I’m writing my library routine and using Scaladoc to generate a document. I want to hide some members in class and object, but Scaladoc shows all of members. Does Scaladoc have the function to hide marked members?
If you want to hide something, you should make it
private, this it is not only hidden in the docs but also it can’t be called from external users.
Thanks. That makes sense to me. In fact, I’m writing my digital chip library in Chisel and there are many senseless definition of variables. I just want to show the interface of the class rather than implement details. Is there better way to do it than defining all variables are private?
Again you should really make them private since users shouldn’t see them (not only in documentation).
However, what you may do is define the interface in a (sealed) trait, and then in the companion object of that trait provide an
apply that generates an anonymous instance of that trait, that way users will only see the interface and the docs would be of the interface.
Thank you. I have known how to do it.