for (int i = 0; i < methParams.size(); i++) {
String paramType = methPrmTypes.get(i);
String param = methParams.get(i);
- //if (callbackType.equals(paramType)) {
if (checkCallbackType(paramType, callbackType)) { // Check if this has callback object
println("try {");
String exchParamType = checkAndGetParamClass(getGenericType(paramType));
checkAndWriteEnumTypeJavaSkeleton(methParams, methPrmTypes);
Map<Integer,String> mapStubParam = null;
- if (isCallbackMethod)
+ if (isCallbackMethod) {
mapStubParam = writeCallbackJavaStubGeneration(methParams, methPrmTypes, callbackType);
+ }
// Check if this is "void"
String retType = intDecl.getMethodType(method);
if (retType.equals("void")) {
}
for (int i = 0; i < methParams.size(); i++) {
- if (isCallbackMethod) {
+ String paramType = methPrmTypes.get(i);
+ if (isCallbackMethod && checkCallbackType(paramType, callbackType)) {
print(mapStubParam.get(i)); // Get the callback parameter
- } else if (isEnumClass(getGenericType(methPrmTypes.get(i)))) { // Enum class
- print(getEnumParam(methPrmTypes.get(i), methParams.get(i), i));
- } else if (isStructClass(getGenericType(methPrmTypes.get(i)))) {
+ } else if (isEnumClass(getGenericType(paramType))) { // Enum class
+ print(getEnumParam(paramType, methParams.get(i), i));
+ } else if (isStructClass(getGenericType(paramType))) {
print("paramStruct" + i);
} else {
- String prmType = checkAndGetArray(methPrmTypes.get(i), methParams.get(i));
+ String prmType = checkAndGetArray(paramType, methParams.get(i));
if (isStructMethod)
print("(" + prmType + ") paramObj[offset" + i + "]");
else
if (checkCallbackType(paramType, callbackType)) { // Check if this has callback object
print("&___paramCB");
} else
- print(getSimpleIdentifier(methParams.get(i)));
+ print("&" + getSimpleIdentifier(methParams.get(i)));
if (i != methParams.size() - 1)
print(", ");
}