SWF-466 - Add a "type" attribute to "evaluation-result" to support type conversion of the action result.
This commit is contained in:
@@ -91,7 +91,7 @@ public class MethodInvoker {
|
||||
+ StylerUtils.style(arguments) + " on bean [" + bean + "]");
|
||||
|
||||
}
|
||||
Object returnValue = applyTypeConversion(method.invoke(bean, arguments), signature.getDesiredResultType());
|
||||
Object returnValue = method.invoke(bean, arguments);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Invoked method with signature [" + key + "] returned value [" + returnValue + "]");
|
||||
}
|
||||
|
||||
@@ -38,17 +38,12 @@ public class MethodSignature {
|
||||
*/
|
||||
private Parameters parameters;
|
||||
|
||||
/**
|
||||
* The desired result type of the method invocation
|
||||
*/
|
||||
private Class desiredResultType;
|
||||
|
||||
/**
|
||||
* Creates a method signature with no parameters.
|
||||
* @param methodName the name of the method
|
||||
*/
|
||||
public MethodSignature(String methodName) {
|
||||
this(methodName, Parameters.NONE, null);
|
||||
this(methodName, Parameters.NONE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,21 +52,19 @@ public class MethodSignature {
|
||||
* @param parameter the method parameter
|
||||
*/
|
||||
public MethodSignature(String methodName, Parameter parameter) {
|
||||
this(methodName, new Parameters(parameter), null);
|
||||
this(methodName, new Parameters(parameter));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a method signature with a list of parameters.
|
||||
* @param methodName the name of the method
|
||||
* @param parameters the method parameters
|
||||
* @param desiredResultType the desired result type of the method invocation
|
||||
*/
|
||||
public MethodSignature(String methodName, Parameters parameters, Class desiredResultType) {
|
||||
public MethodSignature(String methodName, Parameters parameters) {
|
||||
Assert.notNull(methodName, "The method name is required");
|
||||
Assert.notNull(parameters, "The parameters are required");
|
||||
this.methodName = methodName;
|
||||
this.parameters = parameters;
|
||||
this.desiredResultType = desiredResultType;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,14 +81,6 @@ public class MethodSignature {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the desired result type of the method invocation
|
||||
* @return the desired result type
|
||||
*/
|
||||
public Class getDesiredResultType() {
|
||||
return desiredResultType;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof MethodSignature)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user