Updated getter snippets for Java