8

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.

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Could you show a quick code example? It would help make your answer clearer.
Just write out the methods as though they were abstract, without the abstract keyword, i.e. just a semicolon instead of the method body. You can't compile that, but you can Javadoc it.
This worked! I created a seperate project for this and did just as you said. The project will be full of errors but the JavaDoc generator has no issues with that. In my main project I attached the docs and it worked like a charm. Thank you :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.