List of usage examples for java.lang.reflect Executable getParameters
public Parameter[] getParameters()
From source file:MyClass.java
public static ArrayList<String> getParameters(Executable exec) { Parameter[] parms = exec.getParameters(); ArrayList<String> parmList = new ArrayList<>(); for (int i = 0; i < parms.length; i++) { int mod = parms[i].getModifiers() & Modifier.parameterModifiers(); String modifiers = Modifier.toString(mod); String parmType = parms[i].getType().getSimpleName(); String parmName = parms[i].getName(); String temp = modifiers + " " + parmType + " " + parmName; if (temp.trim().length() == 0) { continue; }/*from ww w .ja v a 2 s.com*/ parmList.add(temp.trim()); } return parmList; }