add java class snippet