this.method = method;
this.genericReturnType = ClassUtils.getGenericReturnTypeOfGenericInterfaceMethod(clazz, method);
this.hasReturnType = genericReturnType != null && !genericReturnType.equals(Void.class) && !genericReturnType.equals(Void.TYPE);
if (!hasReturnType && httpMethod.equals("GET"))
{
throw new InternalServerErrorException("Invalid rest method: " + method.toString() + ". @GET methods " +
"can not be void.", "Can not execute requested service");
}
this.methodInvoker = new MethodInvoker(resourceClass, method, httpMethod);
this.cacheInfo = HttpMethodHelper.getCacheInfoForGET(method);