append Java method: expand-macro