# JAVADOC CHEATSHEET ## Introduction The major important thing is the documentation has to be implementation independent and specification concise. Dependencies where ever necessary are allowed to be specified. Also it is allows HTML tags to be used in between the documentation comments. Pretty much all tags are self explanatory. __Meta Annotations__ _@author_  __Ex:__ @author Jane Doe _@version_  __Ex:__ @version v1.0-alpha _@since_  __Ex:__ @since 2015-09-22 __Method Annotations__ _@param parameter description_  __Ex:__ @param img the image to be passed _@return parameter description_  __Ex:__ @return img the image to be returned _@throws/exception description_  __Ex:__ @throws IOException If I/O exception occurred __Deprecated__ _@deprecated_ deprecated-text(_optional_)  __Ex:__ @deprecated since version v1.0 __Linking__ _@see reference_  __Ex:__ @see package.ClassA/_url_/_string_ _{@link package.class#member label}_  __Ex:__ {@link URL}/{@link ImageObserver} This is descriptive text _@serial/serialField/serialData_  __Ex:__ @serialField Field1 ## Important Notes 1. Write keywords in __"code"__ tag example : __null__ with this tag. 2. Add the tags in the following order : @author (classes and interfaces) @version (classes and interfaces) @param (methods and constructors) @return (methods) @exception (@throws from Javadoc 1.2) @see (If multiple @see, then order according to distance from current file) @since (Follow format throughout document) @serial (or @serialField or @serialData) @deprecated (see How and When To Deprecate APIs) ## Basic Command Working Examples 1. javadoc AddAcc.java : Simply creates Javadoc file in the same directory. 2. javadoc -d doc BankAcc.java : creates Javadoc files for the specified file in same directory in specified folder __doc__. 3. javadoc -d doc bankpackage/*.java : Javadoc files for complete package created in __doc__ folder in current directory. 4. javadoc -tag newTag. : a : ”New Tag: “ -d doc BankAcc.java : For adding new custom tag in documentation for either specified file or package.