Java tutorial
//package com.java2s; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.VariableElement; public class Main { public static String getArguments(ExecutableElement d) { Collection<? extends VariableElement> params = d.getParameters(); if (params.size() == 0) return ""; StringBuilder sbuf = new StringBuilder(params.size() * 20); for (VariableElement param : params) { sbuf.append(param.getSimpleName()); sbuf.append(','); } sbuf.setLength(sbuf.length() - 1); return sbuf.toString(); } }