Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Write JavaDocs for external library

My situation is I have an external compiled library (jar) from a 3rd party with no JavaDocs. As I'm developing I want to document the classes and methods by testing and using the very limited documentation I get from the website of the 3rd party.

My end goal is to have a JavaDoc documentation which I will be able to use in IntelliJ for the Code-Hinting and documentation lookup?

So my question is, is it possible to write JavaDocs to a already compiled jar file which I will be able to import? Perhaps using a tool which assists this.

like image 567
JensV Avatar asked Jun 26 '17 10:06

JensV


People also ask

What are Javadocs used for?

Javadoc is a tool which comes with JDK and it is used for generating Java code documentation in HTML format from Java source code, which requires documentation in a predefined format.

Do you write Javadoc for private methods?

Nope, you shouldn't write javadoc for private methods. End users don't have access to private fields or methods so there really isn't a point in providing javadoc for them. Private fields and methods are only meant for the developer. If you really need to though, feel free to write comments for non-obvious logic.

What is Javadoc give example?

Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer. (As an example, see Oracle's Javadoc documentation for the Java libraries at http://download.oracle.com/javase/6/docs/api/.)


1 Answers

Yes it is. All you have to do is write out the class and interface and method and variable definitions, without any code, as though all the methods were abstract, and then write Javadoc comments for those. This is actually how Sun produced the Javadoc, via a completely separate source tree controlled by the technical writers and editors (hi Doug!), with a merge process late in the build process for releasing the source code.

like image 147
user207421 Avatar answered Oct 06 '22 01:10

user207421