replace defns for java methods with memfn