The MethodDeclaration
instance is part of the AST representing the syntax of the source code. It requires resolving the type names found in the source code before you can create a signature for a method.
for (MethodDeclaration methodDeclaration :methodDeclarations){
// the next line requires that the project is setup correctly
IMethodBinding resolved = methodDeclaration.resolveBinding();
// then you can create a method signature
ITypeBinding[] pType = resolved.getParameterTypes();
String[] pTypeName=new String[pType.length];
for(int ix = 0; ix < pType.length; ix++)
pTypeName[ix]=pType[ix].getBinaryName().replace('.', '/');
String rTypeName=resolved.getReturnType().getBinaryName().replace('.', '/');
//org.eclipse.jdt.core.Signature
String signature = Signature.createMethodSignature(pTypeName, rTypeName);
System.out.println(signature);
}