private static boolean methodReturnsValue(CtBehavior method) throws NotFoundException {

        if (method instanceof CtMethod == false) {
            return false;
        }

        CtClass returnType = ((CtMethod) method).getReturnType();
        String returnTypeName = returnType.getName();

        boolean isVoidMethod = "void".equals(returnTypeName);

        boolean methodReturnsValue = isVoidMethod == false;
        return methodReturnsValue;
    }
determine if the given method returns a value, and return true if so.
false otherwise.

@param method
@return
@throws NotFoundException
slf4j-ext/src/main/java/org/slf4j/instrumentation/JavassistHelper.java