org.artifact.protocol.convert.CsConvert Maven / Gradle / Ivy
package org.artifact.protocol.convert;
public class CsConvert extends AbstractConvert{
@Override
protected String doConvert(String classPath, String protocolType, boolean baseType) {
String convertType = "";
switch (protocolType) {
case "byte":
convertType = "byte";
break;
case "short":
convertType = "short";
break;
case "int":
convertType = "int";
break;
case "long":
convertType = "long";
break;
case "float":
convertType = "float";
break;
case "double":
convertType = "double";
break;
case "boolean":
convertType = "bool";
break;
case "char":
convertType = "char";
break;
case "string":
case "String":
convertType = "string";
break;
case "map":
convertType = "Dictionary";
// convertType = "Hashtable";
break;
case "list":
convertType = "List";
break;
default:
// convertType = classPath+"."+protocolType;
convertType = protocolType;
break;
}
return convertType;
}
}