JMethod (JDefinedClass jclass, JFieldVar field) { JMethod getter = jclass.method(JMod.PUBLIC, field.type(), "getAdditionalProperties"); ruleFactory.getAnnotator().anyGetter(getter, jclass); getter.body()._return(JExpr._this().ref(field)); return getter; }