protected static String getMethodSignature ( String methodName , Class < ? > [ ] parameterTypes , Class < ? > returnType ) { StringBuilder buffer = new StringBuilder ( methodName ) ; buffer . append ( "(" ) ; if ( parameterTypes != null ) { int index = 0 ; for ( Class < ? > parameterType : parameterTypes ) { buffer . append ( index ++ > 0 ? ", :" : ":" ) ; buffer . append ( getSimpleName ( parameterType ) ) ; } } buffer . append ( "):" ) ; buffer . append ( returnType == null || Void . class . equals ( returnType ) ? "void" : getSimpleName ( returnType ) ) ; return buffer . toString ( ) ; }
Builds the signature of a method based on the method s name parameter types and return type .