You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The manual's section on writing stub files begins with "If you have access to the Java source code...". There is no parallel section for "if you do not have access to the Java source code", which, in my experience, is the most common reason to want to create a stub file. It looks like the parallel structure was removed in c60a5ef, because of a breaking change to the StubGenerator. However, the StubGenerator is not necessary to create a useful stub for a library for which you don't have the source code.
My usual process is the following:
locate the Javadoc for the method that needs to be annotated
create a stub file containing only that class (in the appropriate package)
copy the method signature from the Javadoc
add the necessary annotations
This process is easy and lightweight. I propose adding a description of it to the manual to replace the lost parallel structure. @mernst, if that's okay with you, I'll open a PR.
(For context, I'm writing this because I sent an undergrad to the manual expecting them to find a nice writeup of the above process, and they came back to me frustrated after trying to write a stub file based on the "if you have access to the Java source file" section for an obscure, old part of the JDK.)
The text was updated successfully, but these errors were encountered:
The manual's section on writing stub files begins with "If you have access to the Java source code...". There is no parallel section for "if you do not have access to the Java source code", which, in my experience, is the most common reason to want to create a stub file. It looks like the parallel structure was removed in c60a5ef, because of a breaking change to the StubGenerator. However, the StubGenerator is not necessary to create a useful stub for a library for which you don't have the source code.
My usual process is the following:
This process is easy and lightweight. I propose adding a description of it to the manual to replace the lost parallel structure. @mernst, if that's okay with you, I'll open a PR.
(For context, I'm writing this because I sent an undergrad to the manual expecting them to find a nice writeup of the above process, and they came back to me frustrated after trying to write a stub file based on the "if you have access to the Java source file" section for an obscure, old part of the JDK.)
The text was updated successfully, but these errors were encountered: