public static String ofMethod(CtClass returnType, CtClass[] paramTypes) {
        StringBuffer desc = new StringBuffer();
        desc.append('(');
        if (paramTypes != null) {
            int n = paramTypes.length;
            for (int i = 0; i < n; ++i)
                toDescriptor(desc, paramTypes[i]);
        }

        desc.append(')');
        if (returnType != null)
            toDescriptor(desc, returnType);

        return desc.toString();
    }