Add javadoc

(cherry picked from commit 98665bf254d46b3e3bc686b85a57517db2805b47)