Giter Site home page Giter Site logo

modern-java-recipes's Introduction

Modern-Java-Recipes

Documenting all "recipes" described in Modern Java Recipes by Ken Kousen. The documentation is done as JavaDoc.

Generate the Javadoc

In the root of the project run: javadoc -d doc src// The depth of the hierarchy needs to be taken into consideration when generating the Javadoc files.

< and > characters

&#60 ; and &#62 ;

Referencing methods from current class

For referencing a method from the current class you could use {@link#anonymousInnerClassForRunnable()} and not {@link LambdaExpression#anonymousInnerClassForRunnable()} (Check raw document for code.)

Add description to the package

In the package for which a description is needed implement package-info.java file. Multiple lines can be written but the code will be displayed until the first period. Link: https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#packagecomment

Add images

A directory named "doc-files" needs to exist and to include the images. I think this directory should be in src/, under the package, but for me it worked only having it in the root of the project and then adding the image to my Javadoc like this: showing the explanation in Javadoc Otherwise the next error is received: Loading source file src/chapter_1_The_Basics/StaticMethodsInInterfaces.java... javadoc: error - Illegal package name: "src/chapter_1_The_Basics/doc-files"

Link: https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#unprocessed

-docfilessubdirs Enables deep copying of "doc-files" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory doc-files/example/images and all its contents would now be copied. There is also an option to exclude subdirectories.

-excludedocfilessubdir name1:name2... Excludes any "doc-files" subdirectories with the given names. This prevents the copying of SCCS and other source-code-control subdirectories. !!! Run: javadoc -d doc -docfilessubdirs src//

Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.