private static void checkSignature(CtMethod wrappedBody,
                                       String descriptor)
        throws CannotCompileException
    {
        if (!descriptor.equals(wrappedBody.getMethodInfo2().getDescriptor()))
            throw new CannotCompileException(
                        "wrapped method with a bad signature: "
                        + wrappedBody.getDeclaringClass().getName()
                        + '.' + wrappedBody.getName());
    }