Here you can find the source of getMethodUniqueName(Method method)
public static String getMethodUniqueName(Method method)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; public class Main { public static String getMethodUniqueName(Method method) { try {/*from ww w . j a v a 2s .c o m*/ StringBuilder sb = new StringBuilder(); sb.append(method.getDeclaringClass().getName()).append('.'); sb.append(method.getName()).append('('); Class<?>[] params = method.getParameterTypes(); if (params != null) { for (int j = 0; j < params.length; j++) { sb.append(getTypeName(params[j])); if (j < (params.length - 1)) sb.append(','); } } sb.append(')'); return sb.toString(); } catch (Exception e) { return null; } } public static String getTypeName(Class<?> type) { if (type.isArray()) { try { Class<?> cl = type; int dimensions = 0; while (cl.isArray()) { dimensions++; cl = cl.getComponentType(); } StringBuffer sb = new StringBuffer(); sb.append(cl.getName()); for (int i = 0; i < dimensions; i++) { sb.append("[]"); } return sb.toString(); } catch (Throwable e) { /*FALLTHRU*/ } } return type.getName(); } }