- /*private void writeStdMethodBodyJavaStub(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method) {
-
- checkAndWriteStructSetupJavaStub(methParams, methPrmTypes, intDecl, method);
- println("int methodId = " + intDecl.getMethodNumId(method) + ";");
- String retType = intDecl.getMethodType(method);
- println("Class<?> retType = " + getSimpleType(getStructType(getEnumType(retType))) + ".class;");
- checkAndWriteEnumTypeJavaStub(methParams, methPrmTypes);
- // Generate array of parameter types
- if (isStructPresent(methParams, methPrmTypes)) {
- writeStructParamClassJavaStub(methParams, methPrmTypes);
- } else {
- print("Class<?>[] paramCls = new Class<?>[] { ");
- for (int i = 0; i < methParams.size(); i++) {
- String paramType = checkAndGetArray(methPrmTypes.get(i), methParams.get(i));
- print(getSimpleType(getEnumType(paramType)) + ".class");
- // Check if this is the last element (don't print a comma)
- if (i != methParams.size() - 1) {
- print(", ");
- }
- }
- println(" };");
- // Generate array of parameter objects
- print("Object[] paramObj = new Object[] { ");
- for (int i = 0; i < methParams.size(); i++) {
- print(getEnumParam(methPrmTypes.get(i), getSimpleIdentifier(methParams.get(i)), i));
- // Check if this is the last element (don't print a comma)
- if (i != methParams.size() - 1) {
- print(", ");
- }
- }
- println(" };");
- }
- // Check if this is "void"
- if (retType.equals("void")) {
- println("rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);");
- } else { // We do have a return value
- // Generate array of parameter types
- if (isStructClass(getGenericType(getSimpleArrayType(retType)))) {
- writeStructReturnJavaStub(getGenericType(getSimpleArrayType(retType)), retType);
- } else {
- // This is an enum type
- if (getParamCategory(getGenericType(getSimpleArrayType(retType))) == ParamCategory.ENUM) {
- println("Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);");
- checkAndWriteEnumRetTypeJavaStub(retType);
- } else if (getParamCategory(retType) == ParamCategory.NONPRIMITIVES) {
- // Check if the return value NONPRIMITIVES
- String retGenValType = getGenericType(retType);
- println("Class<?> retGenValType = " + retGenValType + ".class;");
- println("Object retObj = rmiCall.remoteCall(objectId, methodId, retType, retGenValType, paramCls, paramObj);");
- println("return (" + retType + ")retObj;");
- } else {
- println("Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);");
- println("return (" + retType + ")retObj;");
- }
- }
- }
- }*/
-
-