Fixed issues with list return types failing code gen for lanaguages that return Arrays for Lists

This commit is contained in:
rpidikiti 2011-09-12 17:46:05 -07:00
parent d715574238
commit d871755e8d
2 changed files with 13 additions and 2 deletions

View File

@ -32,6 +32,8 @@ public class ResourceMethod {
private List<MethodArgument> pathParameters; private List<MethodArgument> pathParameters;
private String returnValueFromOperationJson;
private String returnValue; private String returnValue;
private String returnClassName; private String returnClassName;
@ -114,6 +116,14 @@ public class ResourceMethod {
this.returnValue = returnValue; this.returnValue = returnValue;
} }
public String getReturnValueFromOperationJson() {
return returnValueFromOperationJson;
}
public void setReturnValueFromOperationJson(String returnValue) {
this.returnValueFromOperationJson = returnValue;
}
public String getReturnClassName() { public String getReturnClassName() {
return returnClassName; return returnClassName;
} }
@ -206,7 +216,7 @@ public class ResourceMethod {
} }
public boolean isReturnValueList() { public boolean isReturnValueList() {
if(this.getReturnValue().startsWith("List")){ if(this.getReturnValueFromOperationJson().startsWith("List")){
return true; return true;
} }
return false; return false;

View File

@ -310,6 +310,7 @@ public class EndpointOperation {
else{ else{
method.setHasResponseValue(true); method.setHasResponseValue(true);
} }
method.setReturnValueFromOperationJson(responseClass);
method.setReturnValue(dataTypeMapper.getClassType(responseClass, false)); method.setReturnValue(dataTypeMapper.getClassType(responseClass, false));
method.setReturnClassName(dataTypeMapper.getGenericType(responseClass)); method.setReturnClassName(dataTypeMapper.getGenericType(responseClass));