Add javadoc

(cherry picked from commit 107f0eb3c1ded09c1ec66f84cc2689037694db36)