Java Reflection Method Signature getMethodSignature(Method method)

Here you can find the source of getMethodSignature(Method method)

Description

get Method Signature

License

Apache License

Declaration

public static String getMethodSignature(Method method) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.lang.reflect.Method;

public class Main {

    public static String getMethodSignature(Method method) {
        String genericString = method.toGenericString();
        String declaringClassName = method.getDeclaringClass().getName();
        int a = genericString.indexOf(" " + declaringClassName + ".");
        int b = genericString.lastIndexOf(')');
        return genericString.substring(a + declaringClassName.length() + 2, b + 1);
    }//w  ww  . j a v a 2 s.  c  o  m
}

Related

  1. getMethodSignature(Method m)
  2. getMethodSignature(Method method)
  3. getMethodSignature(Method method)
  4. getMethodSignature(Method method)
  5. getMethodSignature(Method method)
  6. getMethodSignature(Method method)
  7. getMethodSignature(Method method)
  8. getMethodSignatureWithLongTypeNames(Method method)
  9. getMethodWithSignature(Class clazz, String methodName, Class[] params)