* @param obj 方法所在的对象。
*
* @return ResultType代理对象。
*/
private ResultTypeProxy createResultTypeProxy(Method method, Object obj) {
ResultType type = method.getAnnotation(ResultType.class);
Class[] params = method.getParameterTypes();
boolean requireAction = false;
//ResultType代理的方法无参数或参数仅为ActionInvocation或其子类
if (params.length == 0) {
requireAction = false;
} else if (isProxyMethod(params)) {
requireAction = true;
} else {
throw new IllegalArgumentException("Illegal arguments in ResultType : " + method);
}
return new ResultTypeProxy(type.type().trim(), method, obj, requireAction);
}