Add snippet for new java object