diff options
127 files changed, 2823 insertions, 2675 deletions
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 0a20815d592..ba141e904c0 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -1299,19 +1299,25 @@ Slice::JavaCompatGenerator::typeToObjectString(const TypePtr& type, void Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, - const string& package, - const TypePtr& type, - OptionalMode mode, - bool optionalMapping, - int tag, - const string& param, - bool marshal, - int& iter, - bool holder, - const StringList& metaData, - const string& patchParams) + const string& package, + const TypePtr& type, + OptionalMode mode, + bool optionalMapping, + int tag, + const string& param, + bool marshal, + int& iter, + bool holder, + const string& customStream, + const StringList& metaData, + const string& patchParams) { - string stream = marshal ? "__os" : "__is"; + string stream = customStream; + if(stream.empty()) + { + stream = marshal ? "ostr" : "istr"; + } + string v; if(holder) { @@ -1585,9 +1591,9 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } else if(mode == OptionalMember) { - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << stream << ".writeProxy(" << v << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; } else { @@ -1634,26 +1640,26 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << "if(" << v << " != null && " << v << ".isSet() && " << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << typeS << "Helper.write(" << stream << ", " << v << ".get());"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; out << eb; } else { out << nl << "if(" << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << typeS << "Helper.write(" << stream << ", " << v << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; out << eb; } } else if(mode == OptionalMember) { - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << typeS << "Helper.write(" << stream << ", " << v << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; } else { @@ -1776,9 +1782,9 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, if(st->isVariableLength()) { - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << typeS << ".write(" << stream << ", " << val << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; } else { @@ -1811,9 +1817,9 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << stream << ".skipSize();"; } - out << nl << typeS << " __tmpOpt = new " << typeS << "();"; - out << nl << "__tmpOpt.__read(" << stream << ");"; - out << nl << v << ".set(__tmpOpt);"; + out << nl << typeS << " tmpOpt = new " << typeS << "();"; + out << nl << "tmpOpt.read(" << stream << ");"; + out << nl << v << ".set(tmpOpt);"; out << eb; @@ -1928,9 +1934,9 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, if(keyType->isVariableLength() || valueType->isVariableLength()) { string d = optionalParam && optionalMapping ? v + ".get()" : v; - out << nl << "int __pos = " << stream << ".startSize();"; - writeDictionaryMarshalUnmarshalCode(out, package, dict, d, marshal, iter, true, metaData); - out << nl << stream << ".endSize(__pos);"; + out << nl << "int pos = " << stream << ".startSize();"; + writeDictionaryMarshalUnmarshalCode(out, package, dict, d, marshal, iter, true, customStream, metaData); + out << nl << stream << ".endSize(pos);"; } else { @@ -1938,17 +1944,17 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam && optionalMapping) { - tmpName = "__optDict"; + tmpName = "optDict"; out << nl << "final " << typeS << ' ' << tmpName << " = " << v << ".get();"; } else { tmpName = v; } - out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; - out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize - << " + 5 : __optSize * " << wireSize << " + 1);"; - writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, metaData); + out << nl << "final int optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; + out << nl << stream << ".writeSize(optSize > 254 ? optSize * " << wireSize + << " + 5 : optSize * " << wireSize << " + 1);"; + writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, customStream, metaData); } if(optionalParam) @@ -1962,7 +1968,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, if(optionalParam) { - tmpName = "__optDict"; + tmpName = "optDict"; out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << typeS << ' ' << tmpName << ';'; @@ -1981,7 +1987,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << stream << ".skipSize();"; } - writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, metaData); + writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, customStream, metaData); if(optionalParam) { @@ -1999,7 +2005,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } else { - writeDictionaryMarshalUnmarshalCode(out, package, dict, v, marshal, iter, true, metaData); + writeDictionaryMarshalUnmarshalCode(out, package, dict, v, marshal, iter, true, customStream, metaData); } return; } @@ -2090,9 +2096,9 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, if(elemType->isVariableLength()) { string s = optionalParam && optionalMapping ? v + ".get()" : v; - out << nl << "int __pos = " << stream << ".startSize();"; - writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, metaData); - out << nl << stream << ".endSize(__pos);"; + out << nl << "int pos = " << stream << ".startSize();"; + writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, customStream, metaData); + out << nl << stream << ".endSize(pos);"; } else if(findMetaData("java:type:", metaData, ignore) || findMetaData("java:type:", seq->getMetaData(), ignore)) @@ -2105,7 +2111,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam && optionalMapping) { - tmpName = "__optSeq"; + tmpName = "optSeq"; out << nl << "final " << typeS << ' ' << tmpName << " = " << v << ".get();"; } else @@ -2115,11 +2121,11 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, if(wireSize > 1) { - out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; - out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize - << " + 5 : __optSize * " << wireSize << " + 1);"; + out << nl << "final int optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; + out << nl << stream << ".writeSize(optSize > 254 ? optSize * " << wireSize + << " + 5 : optSize * " << wireSize << " + 1);"; } - writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); } else if(findMetaData("java:protobuf:", seq->getMetaData(), ignore) || findMetaData("java:serializable:", seq->getMetaData(), ignore)) @@ -2128,7 +2134,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, // This just writes a byte sequence. // string s = optionalParam && optionalMapping ? v + ".get()" : v; - writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, customStream, metaData); } else { @@ -2139,7 +2145,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam && optionalMapping) { - tmpName = "__optSeq"; + tmpName = "optSeq"; out << nl << "final " << typeS << ' ' << tmpName << " = " << v << ".get();"; } else @@ -2149,12 +2155,12 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, if(wireSize > 1) { - out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".length;"; - out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize - << " + 5 : __optSize * " << wireSize << " + 1);"; + out << nl << "final int optSize = " << tmpName << " == null ? 0 : " << tmpName << ".length;"; + out << nl << stream << ".writeSize(optSize > 254 ? optSize * " << wireSize + << " + 5 : optSize * " << wireSize << " + 1);"; } - writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); } if(optionalParam) @@ -2167,7 +2173,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam) { - tmpName = "__optSeq"; + tmpName = "optSeq"; out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << typeS << ' ' << tmpName << ';'; @@ -2199,7 +2205,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } } - writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); if(optionalParam) { @@ -2217,7 +2223,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } else { - writeSequenceMarshalUnmarshalCode(out, package, seq, v, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, v, marshal, iter, true, customStream, metaData); } return; } @@ -2237,15 +2243,21 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, void Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, - const string& package, - const DictionaryPtr& dict, - const string& param, - bool marshal, - int& iter, - bool useHelper, - const StringList& metaData) + const string& package, + const DictionaryPtr& dict, + const string& param, + bool marshal, + int& iter, + bool useHelper, + const string& customStream, + const StringList& metaData) { - string stream = marshal ? "__os" : "__is"; + string stream = customStream; + if(stream.empty()) + { + stream = marshal ? "ostr" : "istr"; + } + string v = param; string instanceType; @@ -2305,14 +2317,14 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, { out << nl << "if(" << v << " == null)"; out << sb; - out << nl << "__os.writeSize(0);"; + out << nl << "ostr.writeSize(0);"; out << eb; out << nl << "else"; out << sb; - out << nl << "__os.writeSize(" << v << ".size());"; + out << nl << "ostr.writeSize(" << v << ".size());"; string keyObjectS = typeToObjectString(key, TypeModeIn, package); string valueObjectS = typeToObjectString(value, TypeModeIn, package); - out << nl << "for(java.util.Map.Entry<" << keyObjectS << ", " << valueObjectS << "> __e : " << v + out << nl << "for(java.util.Map.Entry<" << keyObjectS << ", " << valueObjectS << "> e : " << v << ".entrySet())"; out << sb; for(int i = 0; i < 2; i++) @@ -2321,15 +2333,15 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, TypePtr type; if(i == 0) { - arg = "__e.getKey()"; + arg = "e.getKey()"; type = key; } else { - arg = "__e.getValue()"; + arg = "e.getValue()"; type = value; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, true, iter, false); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, true, iter, false, customStream); } out << eb; out << eb; @@ -2337,8 +2349,8 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, else { out << nl << v << " = new " << instanceType << "();"; - out << nl << "int __sz" << iterS << " = __is.readSize();"; - out << nl << "for(int __i" << iterS << " = 0; __i" << iterS << " < __sz" << iterS << "; __i" << iterS << "++)"; + out << nl << "int sz" << iterS << " = " << stream << ".readSize();"; + out << nl << "for(int i" << iterS << " = 0; i" << iterS << " < sz" << iterS << "; i" << iterS << "++)"; out << sb; for(int i = 0; i < 2; i++) { @@ -2347,13 +2359,13 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, string typeS; if(i == 0) { - arg = "__key"; + arg = "key"; type = key; typeS = keyS; } else { - arg = "__value"; + arg = "value"; type = value; typeS = valueS; } @@ -2364,9 +2376,9 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, string keyTypeStr = typeToObjectString(key, TypeModeIn, package); string valueTypeStr = typeToObjectString(value, TypeModeIn, package); writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, false, - StringList(), + customStream, StringList(), "new IceInternal.DictionaryPatcher<" + keyTypeStr + ", " + valueTypeStr + - ">(" + v + ", " + typeS + ".class, __key)"); + ">(" + v + ", " + typeS + ".class, key)"); } else { @@ -2378,13 +2390,13 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, { out << nl << typeS << ' ' << arg << ';'; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, false); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, false, customStream); } } BuiltinPtr builtin = BuiltinPtr::dynamicCast(value); if(!(builtin && builtin->usesClasses()) && !ClassDeclPtr::dynamicCast(value)) { - out << nl << "" << v << ".put(__key, __value);"; + out << nl << "" << v << ".put(key, value);"; } out << eb; } @@ -2392,15 +2404,20 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, void Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, - const string& package, - const SequencePtr& seq, - const string& param, - bool marshal, - int& iter, - bool useHelper, - const StringList& metaData) + const string& package, + const SequencePtr& seq, + const string& param, + bool marshal, + int& iter, + bool useHelper, + const string& customStream, + const StringList& metaData) { - string stream = marshal ? "__os" : "__is"; + string stream = customStream; + if(stream.empty()) + { + stream = marshal ? "ostr" : "istr"; + } string v = param; // @@ -2443,9 +2460,9 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << sb; out << nl << v << " = " << type << ".parseFrom(" << stream << ".readByteSeq());"; out << eb; - out << nl << "catch(com.google.protobuf.InvalidProtocolBufferException __ex)"; + out << nl << "catch(com.google.protobuf.InvalidProtocolBufferException ex)"; out << sb; - out << nl << "throw new Ice.MarshalException(__ex);"; + out << nl << "throw new Ice.MarshalException(ex);"; out << eb; } return; @@ -2641,9 +2658,9 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << sb; out << nl << stream << ".writeSize(" << v << ".size());"; string typeS = typeToString(type, TypeModeIn, package); - out << nl << "for(" << typeS << " __elem : " << v << ')'; + out << nl << "for(" << typeS << " elem : " << v << ')'; out << sb; - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", true, iter, false); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", true, iter, false, customStream); out << eb; out << eb; // else } @@ -2656,9 +2673,9 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, isObject = true; } out << nl << v << " = new " << instanceType << "();"; - out << nl << "final int __len" << iter << " = " << stream << ".readAndCheckSeqSize(" << type->minWireSize() + out << nl << "final int len" << iter << " = " << stream << ".readAndCheckSeqSize(" << type->minWireSize() << ");"; - out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < __len" << iter << "; __i" << iter + out << nl << "for(int i" << iter << " = 0; i" << iter << " < len" << iter << "; i" << iter << "++)"; out << sb; if(isObject) @@ -2669,25 +2686,25 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << v << ".add(null);"; ostringstream patchParams; patchParams << "new IceInternal.ListPatcher<" << origContentS << ">(" << v << ", " << origContentS - << ".class, __i" << iter << ')'; - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", false, iter, - false, StringList(), patchParams.str()); + << ".class, i" << iter << ')'; + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", false, iter, + false, customStream, StringList(), patchParams.str()); } else { if(StructPtr::dynamicCast(type)) { - out << nl << cont << " __elem = null;"; + out << nl << cont << " elem = null;"; } else { - out << nl << cont << " __elem;"; + out << nl << cont << " elem;"; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", false, iter, false); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", false, iter, false, customStream); } if(!isObject) { - out << nl << v << ".add(__elem);"; + out << nl << v << ".add(elem);"; } out << eb; iter++; @@ -2819,13 +2836,13 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << v << ".length);"; - out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < " << v << ".length; __i" << iter + out << nl << "for(int i" << iter << " = 0; i" << iter << " < " << v << ".length; i" << iter << "++)"; out << sb; ostringstream o; - o << v << "[__i" << iter << "]"; + o << v << "[i" << iter << "]"; iter++; - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), true, iter, false); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), true, iter, false, customStream); out << eb; out << eb; } @@ -2837,7 +2854,7 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { isObject = true; } - out << nl << "final int __len" << iter << " = " << stream << ".readAndCheckSeqSize(" + out << nl << "final int len" << iter << " = " << stream << ".readAndCheckSeqSize(" << type->minWireSize() << ");"; // // We cannot allocate an array of a generic type, such as @@ -2868,11 +2885,11 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { out << "[]"; } - out << ")new " << nonGenericType << "[__len" << iter << "]"; + out << ")new " << nonGenericType << "[len" << iter << "]"; } else { - out << nl << v << " = new " << origContentS << "[__len" << iter << "]"; + out << nl << v << " = new " << origContentS << "[len" << iter << "]"; } int d = depth; while(d--) @@ -2880,22 +2897,23 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << "[]"; } out << ';'; - out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < __len" << iter << "; __i" << iter + out << nl << "for(int i" << iter << " = 0; i" << iter << " < len" << iter << "; i" << iter << "++)"; out << sb; ostringstream o; - o << v << "[__i" << iter << "]"; + o << v << "[i" << iter << "]"; ostringstream patchParams; if(isObject) { patchParams << "new IceInternal.SequencePatcher(" << v << ", " << origContentS - << ".class, __i" << iter << ')'; + << ".class, i" << iter << ')'; writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, iter, - false, StringList(), patchParams.str()); + false, customStream, StringList(), patchParams.str()); } else { - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, iter, false); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, + iter, false, customStream); } out << eb; iter++; @@ -3361,15 +3379,15 @@ Slice::JavaGenerator::getStaticId(const TypePtr& type, const string& package) co if(b && b->kind() == Builtin::KindObject) { - return "com.zeroc.Ice.Object.ice_staticId"; + return "com.zeroc.Ice.Object.ice_staticId()"; } else if(b && b->kind() == Builtin::KindValue) { - return "com.zeroc.Ice.Value.ice_staticId"; + return "com.zeroc.Ice.Value.ice_staticId()"; } else { - return getAbsolute(cl, package) + ".ice_staticId"; + return getAbsolute(cl, package) + ".ice_staticId()"; } } @@ -3695,10 +3713,15 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, const string& param, bool marshal, int& iter, + const string& customStream, const StringList& metaData, const string& patchParams) { - const string stream = marshal ? "__os" : "__is"; + string stream = customStream; + if(stream.empty()) + { + stream = marshal ? "ostr" : "istr"; + } const bool optionalParam = mode == OptionalInParam || mode == OptionalOutParam || mode == OptionalReturnParam; const BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); @@ -3952,9 +3975,9 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } else if(mode == OptionalMember) { - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << stream << ".writeProxy(" << param << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; } else { @@ -4001,26 +4024,26 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << "if(" << param << " != null && " << param << ".isPresent() && " << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << stream << ".writeProxy(" << param << ".get());"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; out << eb; } else { out << nl << "if(" << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << stream << ".writeProxy(" << param << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; out << eb; } } else if(mode == OptionalMember) { - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << stream << ".writeProxy(" << param << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; } else { @@ -4116,9 +4139,9 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(st->isVariableLength()) { - out << nl << "int __pos = " << stream << ".startSize();"; + out << nl << "int pos = " << stream << ".startSize();"; out << nl << typeS << ".write(" << stream << ", " << val << ");"; - out << nl << stream << ".endSize(__pos);"; + out << nl << stream << ".endSize(pos);"; } else { @@ -4260,9 +4283,9 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(keyType->isVariableLength() || valueType->isVariableLength()) { string d = optionalParam && optionalMapping ? param + ".get()" : param; - out << nl << "int __pos = " << stream << ".startSize();"; - writeDictionaryMarshalUnmarshalCode(out, package, dict, d, marshal, iter, true, metaData); - out << nl << stream << ".endSize(__pos);"; + out << nl << "int pos = " << stream << ".startSize();"; + writeDictionaryMarshalUnmarshalCode(out, package, dict, d, marshal, iter, true, customStream, metaData); + out << nl << stream << ".endSize(pos);"; } else { @@ -4270,17 +4293,17 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam && optionalMapping) { - tmpName = "__optDict"; + tmpName = "optDict"; out << nl << "final " << typeS << ' ' << tmpName << " = " << param << ".get();"; } else { tmpName = param; } - out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; - out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize - << " + 5 : __optSize * " << wireSize << " + 1);"; - writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, metaData); + out << nl << "final int optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; + out << nl << stream << ".writeSize(optSize > 254 ? optSize * " << wireSize + << " + 5 : optSize * " << wireSize << " + 1);"; + writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, customStream, metaData); } if(optionalParam) @@ -4294,7 +4317,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(optionalParam) { - tmpName = "__optDict"; + tmpName = "optDict"; out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << typeS << ' ' << tmpName << ';'; @@ -4313,7 +4336,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << stream << ".skipSize();"; } - writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, metaData); + writeDictionaryMarshalUnmarshalCode(out, package, dict, tmpName, marshal, iter, true, customStream, metaData); if(optionalParam) { @@ -4328,7 +4351,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } else { - writeDictionaryMarshalUnmarshalCode(out, package, dict, param, marshal, iter, true, metaData); + writeDictionaryMarshalUnmarshalCode(out, package, dict, param, marshal, iter, true, customStream, metaData); } return; } @@ -4419,9 +4442,9 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(elemType->isVariableLength()) { string s = optionalParam && optionalMapping ? param + ".get()" : param; - out << nl << "int __pos = " << stream << ".startSize();"; - writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, metaData); - out << nl << stream << ".endSize(__pos);"; + out << nl << "int pos = " << stream << ".startSize();"; + writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, customStream, metaData); + out << nl << stream << ".endSize(pos);"; } else if(findMetaData("java:type:", metaData, ignore) || findMetaData("java:type:", seq->getMetaData(), ignore)) @@ -4434,7 +4457,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam && optionalMapping) { - tmpName = "__optSeq"; + tmpName = "optSeq"; out << nl << "final " << typeS << ' ' << tmpName << " = " << param << ".get();"; } else @@ -4444,11 +4467,11 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(wireSize > 1) { - out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; - out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize - << " + 5 : __optSize * " << wireSize << " + 1);"; + out << nl << "final int optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();"; + out << nl << stream << ".writeSize(optSize > 254 ? optSize * " << wireSize + << " + 5 : optSize * " << wireSize << " + 1);"; } - writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); } else if(findMetaData("java:protobuf:", seq->getMetaData(), ignore) || findMetaData("java:serializable:", seq->getMetaData(), ignore)) @@ -4457,7 +4480,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, // This just writes a byte sequence. // string s = optionalParam && optionalMapping ? param + ".get()" : param; - writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, customStream, metaData); } else { @@ -4468,7 +4491,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam && optionalMapping) { - tmpName = "__optSeq"; + tmpName = "optSeq"; out << nl << "final " << typeS << ' ' << tmpName << " = " << param << ".get();"; } else @@ -4478,12 +4501,12 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(wireSize > 1) { - out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".length;"; - out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize - << " + 5 : __optSize * " << wireSize << " + 1);"; + out << nl << "final int optSize = " << tmpName << " == null ? 0 : " << tmpName << ".length;"; + out << nl << stream << ".writeSize(optSize > 254 ? optSize * " << wireSize + << " + 5 : optSize * " << wireSize << " + 1);"; } - writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); } if(optionalParam) @@ -4496,7 +4519,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, string tmpName; if(optionalParam) { - tmpName = "__optSeq"; + tmpName = "optSeq"; out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << typeS << ' ' << tmpName << ';'; @@ -4528,7 +4551,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } } - writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); if(optionalParam) { @@ -4543,7 +4566,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } else { - writeSequenceMarshalUnmarshalCode(out, package, seq, param, marshal, iter, true, metaData); + writeSequenceMarshalUnmarshalCode(out, package, seq, param, marshal, iter, true, customStream, metaData); } return; } @@ -4569,9 +4592,15 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, bool marshal, int& iter, bool useHelper, + const string& customStream, const StringList& metaData) { - string stream = marshal ? "__os" : "__is"; + string stream = customStream; + if(stream.empty()) + { + stream = marshal ? "ostr" : "istr"; + } + string v = param; string instanceType; @@ -4631,14 +4660,14 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, { out << nl << "if(" << v << " == null)"; out << sb; - out << nl << "__os.writeSize(0);"; + out << nl << "ostr.writeSize(0);"; out << eb; out << nl << "else"; out << sb; - out << nl << "__os.writeSize(" << v << ".size());"; + out << nl << "ostr.writeSize(" << v << ".size());"; string keyObjectS = typeToObjectString(key, TypeModeIn, package); string valueObjectS = typeToObjectString(value, TypeModeIn, package); - out << nl << "for(java.util.Map.Entry<" << keyObjectS << ", " << valueObjectS << "> __e : " << v + out << nl << "for(java.util.Map.Entry<" << keyObjectS << ", " << valueObjectS << "> e : " << v << ".entrySet())"; out << sb; for(int i = 0; i < 2; i++) @@ -4647,15 +4676,15 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, TypePtr type; if(i == 0) { - arg = "__e.getKey()"; + arg = "e.getKey()"; type = key; } else { - arg = "__e.getValue()"; + arg = "e.getValue()"; type = value; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, true, iter); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, true, iter, customStream); } out << eb; out << eb; @@ -4663,8 +4692,8 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, else { out << nl << v << " = new " << instanceType << "();"; - out << nl << "int __sz" << iterS << " = __is.readSize();"; - out << nl << "for(int __i" << iterS << " = 0; __i" << iterS << " < __sz" << iterS << "; __i" << iterS << "++)"; + out << nl << "int sz" << iterS << " = " << stream << ".readSize();"; + out << nl << "for(int i" << iterS << " = 0; i" << iterS << " < sz" << iterS << "; i" << iterS << "++)"; out << sb; for(int i = 0; i < 2; i++) { @@ -4673,13 +4702,13 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, string typeS; if(i == 0) { - arg = "__key"; + arg = "key"; type = key; typeS = keyS; } else { - arg = "__value"; + arg = "value"; type = value; typeS = valueS; } @@ -4689,10 +4718,10 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, { string keyTypeStr = typeToObjectString(key, TypeModeIn, package); string valueTypeStr = typeToObjectString(value, TypeModeIn, package); - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, StringList(), + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, customStream, StringList(), "new com.zeroc.IceInternal.DictionaryPatcher<" + keyTypeStr + ", " + valueTypeStr + ">(" + v + ", " + typeS + ".class, " + typeS + - ".ice_staticId, __key)"); + ".ice_staticId(), key)"); } else { @@ -4704,13 +4733,13 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, { out << nl << typeS << ' ' << arg << ';'; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, customStream); } } BuiltinPtr builtin = BuiltinPtr::dynamicCast(value); if(!(builtin && builtin->usesClasses()) && !ClassDeclPtr::dynamicCast(value)) { - out << nl << "" << v << ".put(__key, __value);"; + out << nl << "" << v << ".put(key, value);"; } out << eb; } @@ -4724,9 +4753,15 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, bool marshal, int& iter, bool useHelper, + const string& customStream, const StringList& metaData) { - string stream = marshal ? "__os" : "__is"; + string stream = customStream; + if(stream.empty()) + { + stream = marshal ? "ostr" : "istr"; + } + string v = param; // @@ -4769,9 +4804,9 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << sb; out << nl << v << " = " << type << ".parseFrom(" << stream << ".readByteSeq());"; out << eb; - out << nl << "catch(com.google.protobuf.InvalidProtocolBufferException __ex)"; + out << nl << "catch(com.google.protobuf.InvalidProtocolBufferException ex)"; out << sb; - out << nl << "throw new com.zeroc.Ice.MarshalException(__ex);"; + out << nl << "throw new com.zeroc.Ice.MarshalException(ex);"; out << eb; } return; @@ -4967,9 +5002,9 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << sb; out << nl << stream << ".writeSize(" << v << ".size());"; string typeS = typeToString(type, TypeModeIn, package); - out << nl << "for(" << typeS << " __elem : " << v << ')'; + out << nl << "for(" << typeS << " elem : " << v << ')'; out << sb; - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", true, iter); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", true, iter, customStream); out << eb; out << eb; // else } @@ -4982,9 +5017,9 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, isObject = true; } out << nl << v << " = new " << instanceType << "();"; - out << nl << "final int __len" << iter << " = " << stream << ".readAndCheckSeqSize(" << type->minWireSize() + out << nl << "final int len" << iter << " = " << stream << ".readAndCheckSeqSize(" << type->minWireSize() << ");"; - out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < __len" << iter << "; __i" << iter + out << nl << "for(int i" << iter << " = 0; i" << iter << " < len" << iter << "; i" << iter << "++)"; out << sb; if(isObject) @@ -4995,25 +5030,25 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << v << ".add(null);"; ostringstream patchParams; patchParams << "new com.zeroc.IceInternal.ListPatcher<" << origContentS << ">(" << v << ", " - << origContentS << ".class, " << origContentS << ".ice_staticId, __i" << iter << ')'; - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", false, iter, - StringList(), patchParams.str()); + << origContentS << ".class, " << origContentS << ".ice_staticId(), i" << iter << ')'; + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", false, iter, + customStream, StringList(), patchParams.str()); } else { if(StructPtr::dynamicCast(type)) { - out << nl << cont << " __elem = null;"; + out << nl << cont << " elem = null;"; } else { - out << nl << cont << " __elem;"; + out << nl << cont << " elem;"; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", false, iter); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", false, iter, customStream); } if(!isObject) { - out << nl << v << ".add(__elem);"; + out << nl << v << ".add(elem);"; } out << eb; iter++; @@ -5145,13 +5180,13 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << v << ".length);"; - out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < " << v << ".length; __i" << iter + out << nl << "for(int i" << iter << " = 0; i" << iter << " < " << v << ".length; i" << iter << "++)"; out << sb; ostringstream o; - o << v << "[__i" << iter << "]"; + o << v << "[i" << iter << "]"; iter++; - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), true, iter); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), true, iter, customStream); out << eb; out << eb; } @@ -5163,7 +5198,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { isObject = true; } - out << nl << "final int __len" << iter << " = " << stream << ".readAndCheckSeqSize(" + out << nl << "final int len" << iter << " = " << stream << ".readAndCheckSeqSize(" << type->minWireSize() << ");"; // // We cannot allocate an array of a generic type, such as @@ -5194,11 +5229,11 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { out << "[]"; } - out << ")new " << nonGenericType << "[__len" << iter << "]"; + out << ")new " << nonGenericType << "[len" << iter << "]"; } else { - out << nl << v << " = new " << origContentS << "[__len" << iter << "]"; + out << nl << v << " = new " << origContentS << "[len" << iter << "]"; } int d = depth; while(d--) @@ -5206,23 +5241,23 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << "[]"; } out << ';'; - out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < __len" << iter << "; __i" << iter + out << nl << "for(int i" << iter << " = 0; i" << iter << " < len" << iter << "; i" << iter << "++)"; out << sb; ostringstream o; - o << v << "[__i" << iter << "]"; + o << v << "[i" << iter << "]"; if(isObject) { ostringstream patchParams; patchParams << "new com.zeroc.IceInternal.SequencePatcher<" << origContentS << ">(" << v << ", " - << origContentS << ".class, " << origContentS << ".ice_staticId, __i" << iter + << origContentS << ".class, " << origContentS << ".ice_staticId(), i" << iter << ')'; writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, iter, - StringList(), patchParams.str()); + customStream, StringList(), patchParams.str()); } else { - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, iter); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, iter, customStream); } out << eb; iter++; diff --git a/cpp/src/Slice/JavaUtil.h b/cpp/src/Slice/JavaUtil.h index d9375be077e..fcc77d30f63 100644 --- a/cpp/src/Slice/JavaUtil.h +++ b/cpp/src/Slice/JavaUtil.h @@ -168,21 +168,22 @@ protected: }; void writeMarshalUnmarshalCode(::IceUtilInternal::Output&, const std::string&, const TypePtr&, OptionalMode, - bool, int, const std::string&, bool, int&, bool = false, - const StringList& = StringList(), const std::string& patchParams = ""); + bool, int, const std::string&, bool, int&, bool = false, const std::string& = "", + const StringList& = StringList(), const std::string& = ""); // // Generate code to marshal or unmarshal a dictionary type. // void writeDictionaryMarshalUnmarshalCode(::IceUtilInternal::Output&, const std::string&, const DictionaryPtr&, - const std::string&, bool, int&, bool, - const StringList& = StringList()); + const std::string&, bool, int&, bool, + const std::string& = "", const StringList& = StringList()); // // Generate code to marshal or unmarshal a sequence type. // void writeSequenceMarshalUnmarshalCode(::IceUtilInternal::Output&, const std::string&, const SequencePtr&, - const std::string&, bool, int&, bool, const StringList& = StringList()); + const std::string&, bool, int&, bool, + const std::string& = "", const StringList& = StringList()); // // Search metadata for an entry with the given prefix and return the entire string. @@ -334,21 +335,22 @@ protected: }; void writeMarshalUnmarshalCode(::IceUtilInternal::Output&, const std::string&, const TypePtr&, OptionalMode, - bool, int, const std::string&, bool, int&, const StringList& = StringList(), - const std::string& patchParams = ""); + bool, int, const std::string&, bool, int&, const std::string& = "", + const StringList& = StringList(), const std::string& = ""); // // Generate code to marshal or unmarshal a dictionary type. // void writeDictionaryMarshalUnmarshalCode(::IceUtilInternal::Output&, const std::string&, const DictionaryPtr&, const std::string&, bool, int&, bool, - const StringList& = StringList()); + const std::string& = "", const StringList& = StringList()); // // Generate code to marshal or unmarshal a sequence type. // void writeSequenceMarshalUnmarshalCode(::IceUtilInternal::Output&, const std::string&, const SequencePtr&, - const std::string&, bool, int&, bool, const StringList& = StringList()); + const std::string&, bool, int&, bool, + const std::string& = "", const StringList& = StringList()); // // Search metadata for an entry with the given prefix and return the entire string. diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 8c3769c0fb6..0e196df0626 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -70,6 +70,21 @@ opFormatTypeToString(const OperationPtr& op) return format; } +string +getEscapedParamName(const OperationPtr& p, const string& name) +{ + ParamDeclList params = p->parameters(); + + for(ParamDeclList::const_iterator i = params.begin(); i != params.end(); ++i) + { + if((*i)->name() == name) + { + return name + "_"; + } + } + return name; +} + bool isDeprecated(const ContainedPtr& p1, const ContainedPtr& p2) { @@ -292,20 +307,20 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s ParamDeclList required, optional; op->outParameters(required, optional); - out << sp << nl << "public void write(com.zeroc.Ice.OutputStream __os)"; + out << sp << nl << "public void write(com.zeroc.Ice.OutputStream ostr)"; out << sb; int iter = 0; for(ParamDeclList::const_iterator pli = required.begin(); pli != required.end(); ++pli) { const string paramName = fixKwd((*pli)->name()); - writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, true, iter, + writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, true, iter, "", (*pli)->getMetaData()); } if(ret && !op->returnIsOptional()) { - writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retval, true, iter, op->getMetaData()); + writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retval, true, iter, "", op->getMetaData()); } // @@ -318,24 +333,24 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s if(checkReturnType && op->returnTag() < (*pli)->tag()) { writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, true, op->returnTag(), retval, true, - iter, op->getMetaData()); + iter, "", op->getMetaData()); checkReturnType = false; } const string paramName = fixKwd((*pli)->name()); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalOutParam, true, (*pli)->tag(), paramName, - true, iter, (*pli)->getMetaData()); + true, iter, "", (*pli)->getMetaData()); } if(checkReturnType) { writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, true, op->returnTag(), retval, true, iter, - op->getMetaData()); + "", op->getMetaData()); } out << eb; - out << sp << nl << "public void read(com.zeroc.Ice.InputStream __is)"; + out << sp << nl << "public void read(com.zeroc.Ice.InputStream istr)"; out << sb; iter = 0; @@ -344,13 +359,13 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s const string paramName = fixKwd((*pli)->name()); const string patchParams = getPatcher((*pli)->type(), package, paramName, false); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, false, iter, - (*pli)->getMetaData(), patchParams); + "", (*pli)->getMetaData(), patchParams); } if(ret && !op->returnIsOptional()) { const string patchParams = getPatcher(ret, package, retval, false); - writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retval, false, iter, op->getMetaData(), + writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retval, false, iter, "", op->getMetaData(), patchParams); } @@ -365,21 +380,21 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s { const string patchParams = getPatcher(ret, package, retval, true); writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, true, op->returnTag(), retval, false, - iter, op->getMetaData(), patchParams); + iter, "", op->getMetaData(), patchParams); checkReturnType = false; } const string paramName = fixKwd((*pli)->name()); const string patchParams = getPatcher((*pli)->type(), package, paramName, true); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalOutParam, true, (*pli)->tag(), paramName, - false, iter, (*pli)->getMetaData(), patchParams); + false, iter, "", (*pli)->getMetaData(), patchParams); } if(checkReturnType) { const string patchParams = getPatcher(ret, package, retval, true); writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, true, op->returnTag(), retval, false, - iter, op->getMetaData(), patchParams); + iter, "", op->getMetaData(), patchParams); } out << eb; @@ -402,7 +417,9 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op const ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container()); assert(cl); const ParamDeclList outParams = op->outParameters(); - const string retval = "__ret"; + const string retval = getEscapedParamName(op, "returnValue"); + const string currentParamName = getEscapedParamName(op, "current"); + const string currentParam = "com.zeroc.Ice.Current " + currentParamName; out << sp; @@ -429,7 +446,7 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op writeDocCommentLines(out, q->second); } } - out << nl << " * @param __current The Current object for the invocation."; + out << nl << " * @param " << currentParamName << " The Current object for the invocation."; out << nl << " **/"; } @@ -444,10 +461,10 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op out << (typeToString((*p)->type(), TypeModeIn, package, (*p)->getMetaData(), true, (*p)->optional(), cl->isLocal()) + " " + fixKwd((*p)->name())); } - out << "com.zeroc.Ice.Current __current" << epar; + out << currentParam << epar; out << sb; - out << nl << "__os = com.zeroc.IceInternal.Incoming.createResponseOutputStream(__current);"; - out << nl << "__os.startEncapsulation(__current.encoding, " << opFormatTypeToString(op) << ");"; + out << nl << "_ostr = com.zeroc.IceInternal.Incoming.createResponseOutputStream(" << currentParamName << ");"; + out << nl << "_ostr.startEncapsulation(" << currentParamName << ".encoding, " << opFormatTypeToString(op) << ");"; ParamDeclList required, optional; op->outParameters(required, optional); @@ -456,12 +473,13 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op { const string paramName = fixKwd((*pli)->name()); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, true, iter, - (*pli)->getMetaData()); + "_ostr", (*pli)->getMetaData()); } if(ret && !op->returnIsOptional()) { - writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retval, true, iter, op->getMetaData()); + writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retval, true, iter, "_ostr", + op->getMetaData()); } // @@ -474,27 +492,27 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op if(checkReturnType && op->returnTag() < (*pli)->tag()) { writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, true, op->returnTag(), retval, true, - iter, op->getMetaData()); + iter, "_ostr", op->getMetaData()); checkReturnType = false; } const string paramName = fixKwd((*pli)->name()); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalOutParam, true, (*pli)->tag(), paramName, - true, iter, (*pli)->getMetaData()); + true, iter, "_ostr", (*pli)->getMetaData()); } if(checkReturnType) { writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, true, op->returnTag(), retval, true, iter, - op->getMetaData()); + "_ostr", op->getMetaData()); } if(op->returnsClasses(false)) { - out << nl << "__os.writePendingValues();"; + out << nl << "_ostr.writePendingValues();"; } - out << nl << "__os.endEncapsulation();"; + out << nl << "_ostr.endEncapsulation();"; out << eb; @@ -502,11 +520,11 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op out << nl << "@Override" << nl << "public com.zeroc.Ice.OutputStream getOutputStream()" << sb - << nl << "return __os;" + << nl << "return _ostr;" << eb; out << sp; - out << nl << "private com.zeroc.Ice.OutputStream __os;"; + out << nl << "private com.zeroc.Ice.OutputStream _ostr;"; out << eb; } @@ -528,7 +546,7 @@ Slice::JavaVisitor::allocatePatcher(Output& out, const TypePtr& type, const stri } out << nl << "com.zeroc.IceInternal.Patcher<" << clsName << "> " << name << " = new com.zeroc.IceInternal.Patcher<" - << clsName << ">(" << clsName << ".class, " << clsName << ".ice_staticId);"; + << clsName << ">(" << clsName << ".class, " << clsName << ".ice_staticId());"; } string @@ -550,14 +568,14 @@ Slice::JavaVisitor::getPatcher(const TypePtr& type, const string& package, const } ostr << "new com.zeroc.IceInternal.Patcher<" << clsName << ">(" << clsName << ".class, " - << clsName << ".ice_staticId, " << "__v -> "; + << clsName << ".ice_staticId(), " << "v -> "; if(optionalMapping) { - ostr << dest << " = java.util.Optional.ofNullable(__v)"; + ostr << dest << " = java.util.Optional.ofNullable(v)"; } else { - ostr << dest << " = __v"; + ostr << dest << " = v"; } ostr << ')'; } @@ -610,7 +628,7 @@ Slice::JavaVisitor::getParams(const OperationPtr& op, const string& package) } vector<string> -Slice::JavaVisitor::getParamsProxy(const OperationPtr& op, const string& package, bool optionalMapping) +Slice::JavaVisitor::getParamsProxy(const OperationPtr& op, const string& package, bool optionalMapping, bool internal) { vector<string> params; @@ -619,7 +637,7 @@ Slice::JavaVisitor::getParamsProxy(const OperationPtr& op, const string& package { const string typeString = typeToString((*q)->type(), TypeModeIn, package, (*q)->getMetaData(), true, optionalMapping && (*q)->optional()); - params.push_back(typeString + ' ' + fixKwd((*q)->name())); + params.push_back(typeString + ' ' + (internal ? "iceP_" + (*q)->name() : fixKwd((*q)->name()))); } return params; @@ -640,18 +658,14 @@ Slice::JavaVisitor::getArgs(const OperationPtr& op) } vector<string> -Slice::JavaVisitor::getInArgs(const OperationPtr& op, bool patcher) +Slice::JavaVisitor::getInArgs(const OperationPtr& op, bool internal) { vector<string> args; ParamDeclList paramList = op->inParameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) { - string s = fixKwd((*q)->name()); - if(patcher && isValue((*q)->type())) - { - s += ".value"; - } + string s = internal ? "iceP_" + (*q)->name() : fixKwd((*q)->name()); args.push_back(s); } @@ -667,9 +681,9 @@ Slice::JavaVisitor::writeMarshalProxyParams(Output& out, const string& package, op->inParameters(required, optional); for(ParamDeclList::const_iterator pli = required.begin(); pli != required.end(); ++pli) { - string paramName = fixKwd((*pli)->name()); + string paramName = "iceP_" + (*pli)->name(); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, true, - iter, (*pli)->getMetaData()); + iter, "", (*pli)->getMetaData()); } // @@ -678,12 +692,12 @@ Slice::JavaVisitor::writeMarshalProxyParams(Output& out, const string& package, for(ParamDeclList::const_iterator pli = optional.begin(); pli != optional.end(); ++pli) { writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalInParam, optionalMapping, - (*pli)->tag(), fixKwd((*pli)->name()), true, iter, (*pli)->getMetaData()); + (*pli)->tag(), "iceP_" + (*pli)->name(), true, iter, "", (*pli)->getMetaData()); } if(op->sendsClasses(false)) { - out << nl << "__os.writePendingValues();"; + out << nl << "ostr.writePendingValues();"; } } @@ -692,16 +706,16 @@ Slice::JavaVisitor::writeUnmarshalProxyResults(Output& out, const string& packag { const ParamDeclList outParams = op->outParameters(); const TypePtr ret = op->returnType(); - const string name = "__ret"; + const string name = "ret"; if(op->returnsMultipleValues()) { string resultType = getResultType(op, package, false, false); out << nl << resultType << ' ' << name << " = new " << resultType << "();"; - out << nl << name << ".read(__is);"; + out << nl << name << ".read(istr);"; if(op->returnsClasses(false)) { - out << nl << "__is.readPendingValues();"; + out << nl << "istr.readPendingValues();"; } out << nl << "return " << name << ';'; } @@ -744,7 +758,7 @@ Slice::JavaVisitor::writeUnmarshalProxyResults(Output& out, const string& packag out << nl << resultType << ' ' << name << ';'; } writeMarshalUnmarshalCode(out, package, type, ret ? OptionalReturnParam : OptionalOutParam, true, - tag, name, false, iter, metaData, name); + tag, name, false, iter, "", metaData, name); } else { @@ -760,12 +774,12 @@ Slice::JavaVisitor::writeUnmarshalProxyResults(Output& out, const string& packag { out << nl << resultType << ' ' << name << ';'; } - writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, name, false, iter, metaData, name); + writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, name, false, iter, "", metaData, name); } if(op->returnsClasses(false)) { - out << nl << "__is.readPendingValues();"; + out << nl << "istr.readPendingValues();"; } if(optional && val) @@ -789,7 +803,7 @@ Slice::JavaVisitor::writeMarshalServantResults(Output& out, const string& packag { if(op->returnsMultipleValues()) { - out << nl << param << ".write(__os);"; + out << nl << param << ".write(ostr);"; } else { @@ -818,12 +832,12 @@ Slice::JavaVisitor::writeMarshalServantResults(Output& out, const string& packag } int iter = 0; - writeMarshalUnmarshalCode(out, package, type, mode, true, tag, param, true, iter, metaData); + writeMarshalUnmarshalCode(out, package, type, mode, true, tag, param, true, iter, "", metaData); } if(op->returnsClasses(false)) { - out << nl << "__os.writePendingValues();"; + out << nl << "ostr.writePendingValues();"; } } @@ -852,26 +866,34 @@ Slice::JavaVisitor::writeThrowsClause(const string& package, const ExceptionList } void -Slice::JavaVisitor::writeMarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter) +Slice::JavaVisitor::writeMarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter, bool forStruct) { - if(!member->optional()) - { - writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, fixKwd(member->name()), - true, iter, member->getMetaData()); - } - else + if(member->optional()) { - out << nl << "if(__has_" << member->name() << " && __os.writeOptional(" << member->tag() << ", " + assert(!forStruct); + out << nl << "if(_" << member->name() << " && ostr_.writeOptional(" << member->tag() << ", " << getOptionalFormat(member->type()) << "))"; out << sb; writeMarshalUnmarshalCode(out, package, member->type(), OptionalMember, false, 0, fixKwd(member->name()), true, - iter, member->getMetaData()); + iter, "ostr_", member->getMetaData()); out << eb; } + else + { + string stream = forStruct ? "" : "ostr_"; + string memberName = fixKwd(member->name()); + if(forStruct) + { + memberName = "this." + memberName; + } + + writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, memberName, + true, iter, stream, member->getMetaData()); + } } void -Slice::JavaVisitor::writeUnmarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter) +Slice::JavaVisitor::writeUnmarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter, bool forStruct) { // TBD: Handle passing interface-by-value @@ -879,17 +901,25 @@ Slice::JavaVisitor::writeUnmarshalDataMember(Output& out, const string& package, if(member->optional()) { - out << nl << "if(__has_" << member->name() << " = __is.readOptional(" << member->tag() << ", " + assert(!forStruct); + out << nl << "if(_" << member->name() << " = istr_.readOptional(" << member->tag() << ", " << getOptionalFormat(member->type()) << "))"; out << sb; writeMarshalUnmarshalCode(out, package, member->type(), OptionalMember, false, 0, fixKwd(member->name()), false, - iter, member->getMetaData(), patchParams); + iter, "istr_", member->getMetaData(), patchParams); out << eb; } else { - writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, fixKwd(member->name()), false, - iter, member->getMetaData(), patchParams); + string stream = forStruct ? "" : "istr_"; + string memberName = fixKwd(member->name()); + if(forStruct) + { + memberName = "this." + memberName; + } + + writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, memberName, false, + iter, stream, member->getMetaData(), patchParams); } } @@ -922,6 +952,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) } vector<string> params = getParams(op, package); + const string currentParam = "com.zeroc.Ice.Current " + getEscapedParamName(op, "current"); const bool amd = p->hasMetaData("amd") || op->hasMetaData("amd"); @@ -939,14 +970,14 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) if(amd) { out << nl << "java.util.concurrent.CompletionStage<" << getResultType(op, package, true, true) << "> " - << op->name() << "Async" << spar << params << "com.zeroc.Ice.Current __current" << epar; + << op->name() << "Async" << spar << params << currentParam << epar; writeThrowsClause(package, throws); out << ';'; } else { out << nl << getResultType(op, package, false, true) << ' ' << fixKwd(op->name()) << spar << params - << "com.zeroc.Ice.Current __current" << epar; + << currentParam << epar; writeThrowsClause(package, throws); out << ';'; } @@ -966,7 +997,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) assert(scopedIter != ids.end()); #endif - out << sp << nl << "static final String[] __ids ="; + out << sp << nl << "static final String[] _iceIds ="; out << sb; for(StringList::const_iterator q = ids.begin(); q != ids.end();) @@ -979,12 +1010,12 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) } out << eb << ';'; - out << sp << nl << "@Override" << nl << "default String[] ice_ids(com.zeroc.Ice.Current __current)"; + out << sp << nl << "@Override" << nl << "default String[] ice_ids(com.zeroc.Ice.Current current)"; out << sb; - out << nl << "return __ids;"; + out << nl << "return _iceIds;"; out << eb; - out << sp << nl << "@Override" << nl << "default String ice_id(com.zeroc.Ice.Current __current)"; + out << sp << nl << "@Override" << nl << "default String ice_id(com.zeroc.Ice.Current current)"; out << sb; out << nl << "return ice_staticId();"; out << eb; @@ -994,11 +1025,11 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << sb; if(p->isInterface()) { - out << nl << "return ice_staticId;"; + out << nl << "return \"" << p->scoped() << "\";"; } else { - out << nl << "return " << fixKwd(p->name()) << ".ice_staticId;"; + out << nl << "return " << fixKwd(p->name()) << ".ice_staticId();"; } out << eb; @@ -1020,7 +1051,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) { out << nl << "@Deprecated"; } - out << nl << "static java.util.concurrent.CompletionStage<com.zeroc.Ice.OutputStream> ___" << opName << '('; + out << nl << "static java.util.concurrent.CompletionStage<com.zeroc.Ice.OutputStream> _iceD_" << opName << '('; if(p->isInterface()) { out << name; @@ -1029,7 +1060,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) { out << '_' << p->name() << "Disp"; } - out << " __obj, final com.zeroc.IceInternal.Incoming __inS, com.zeroc.Ice.Current __current)"; + out << " obj, final com.zeroc.IceInternal.Incoming inS, com.zeroc.Ice.Current current)"; if(!op->throws().empty()) { out.inc(); @@ -1045,7 +1076,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) const ParamDeclList inParams = op->inParameters(); const ParamDeclList outParams = op->outParameters(); - out << nl << "com.zeroc.Ice.Object.__checkMode(" << sliceModeToIceMode(op->mode()) << ", __current.mode);"; + out << nl << "com.zeroc.Ice.Object._iceCheckMode(" << sliceModeToIceMode(op->mode()) << ", current.mode);"; if(!inParams.empty()) { @@ -1054,18 +1085,18 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) // // Declare 'in' parameters. // - out << nl << "com.zeroc.Ice.InputStream __is = __inS.startReadParams();"; + out << nl << "com.zeroc.Ice.InputStream istr = inS.startReadParams();"; for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli) { const TypePtr paramType = (*pli)->type(); if(isValue(paramType)) { - allocatePatcher(out, paramType, package, "__" + (*pli)->name()); + allocatePatcher(out, paramType, package, "icePP_" + (*pli)->name()); values.push_back(*pli); } else { - const string paramName = fixKwd((*pli)->name()); + const string paramName = "iceP_" + (*pli)->name(); const string typeS = typeToString(paramType, TypeModeIn, package, (*pli)->getMetaData(), true, (*pli)->optional()); if((*pli)->optional()) @@ -1094,66 +1125,66 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) int iter = 0; for(ParamDeclList::const_iterator pli = required.begin(); pli != required.end(); ++pli) { - const string paramName = isValue((*pli)->type()) ? ("__" + (*pli)->name()) : fixKwd((*pli)->name()); + const string paramName = isValue((*pli)->type()) ? ("icePP_" + (*pli)->name()) : "iceP_" + (*pli)->name(); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, false, - iter, (*pli)->getMetaData(), paramName); + iter, "", (*pli)->getMetaData(), paramName); } for(ParamDeclList::const_iterator pli = optional.begin(); pli != optional.end(); ++pli) { - const string paramName = isValue((*pli)->type()) ? ("__" + (*pli)->name()) : fixKwd((*pli)->name()); + const string paramName = isValue((*pli)->type()) ? ("icePP_" + (*pli)->name()) : "iceP_" + (*pli)->name(); writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalInParam, true, (*pli)->tag(), - paramName, false, iter, (*pli)->getMetaData(), paramName); + paramName, false, iter, "", (*pli)->getMetaData(), paramName); } if(op->sendsClasses(false)) { - out << nl << "__is.readPendingValues();"; + out << nl << "istr.readPendingValues();"; } - out << nl << "__inS.endReadParams();"; + out << nl << "inS.endReadParams();"; for(ParamDeclList::const_iterator pli = values.begin(); pli != values.end(); ++pli) { const TypePtr paramType = (*pli)->type(); - const string paramName = fixKwd((*pli)->name()); + const string paramName = "iceP_" + (*pli)->name(); const string typeS = typeToString(paramType, TypeModeIn, package, (*pli)->getMetaData(), true, (*pli)->optional()); if((*pli)->optional()) { - out << nl << typeS << ' ' << paramName << " = java.util.Optional.ofNullable(__" << (*pli)->name() + out << nl << typeS << ' ' << paramName << " = java.util.Optional.ofNullable(icePP_" << (*pli)->name() << ".value);"; } else { - out << nl << typeS << ' ' << paramName << " = __" << (*pli)->name() << ".value;"; + out << nl << typeS << ' ' << paramName << " = icePP_" << (*pli)->name() << ".value;"; } } } else { - out << nl << "__inS.readEmptyParams();"; + out << nl << "inS.readEmptyParams();"; } if(op->format() != DefaultFormat) { - out << nl << "__inS.setFormat(" << opFormatTypeToString(op) << ");"; + out << nl << "inS.setFormat(" << opFormatTypeToString(op) << ");"; } if(amd) { if(op->hasMarshaledResult()) { - out << nl << "return __inS.setMarshaledResultFuture(__obj." << opName << "Async" << spar - << getInArgs(op) << "__current" << epar << ");"; + out << nl << "return inS.setMarshaledResultFuture(obj." << opName << "Async" << spar + << getInArgs(op, true) << "current" << epar << ");"; } else { - out << nl << "return __inS.setResultFuture(__obj." << opName << "Async" << spar << getInArgs(op) - << "__current" << epar; + out << nl << "return inS.setResultFuture(obj." << opName << "Async" << spar << getInArgs(op, true) + << "current" << epar; if(ret || !outParams.empty()) { - out << ", (__os, __ret) ->"; + out << ", (ostr, ret) ->"; out.inc(); out << sb; - writeMarshalServantResults(out, package, op, "__ret"); + writeMarshalServantResults(out, package, op, "ret"); out << eb; out.dec(); } @@ -1168,27 +1199,27 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << nl; if(ret || !outParams.empty()) { - out << getResultType(op, package, false, true) << " __ret = "; + out << getResultType(op, package, false, true) << " ret = "; } - out << "__obj." << fixKwd(opName) << spar << getInArgs(op) << "__current" << epar << ';'; + out << "obj." << fixKwd(opName) << spar << getInArgs(op, true) << "current" << epar << ';'; // // Marshal 'out' parameters and return value. // if(op->hasMarshaledResult()) { - out << nl << "return __inS.setMarshaledResult(__ret);"; + out << nl << "return inS.setMarshaledResult(ret);"; } else if(ret || !outParams.empty()) { - out << nl << "com.zeroc.Ice.OutputStream __os = __inS.startWriteParams();"; - writeMarshalServantResults(out, package, op, "__ret"); - out << nl << "__inS.endWriteParams(__os);"; - out << nl << "return __inS.setResult(__os);"; + out << nl << "com.zeroc.Ice.OutputStream ostr = inS.startWriteParams();"; + writeMarshalServantResults(out, package, op, "ret"); + out << nl << "inS.endWriteParams(ostr);"; + out << nl << "return inS.setResult(ostr);"; } else { - out << nl << "return __inS.setResult(__inS.writeEmptyParams());"; + out << nl << "return inS.setResult(inS.writeEmptyParams());"; } } @@ -1207,7 +1238,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) allOpNames.sort(); allOpNames.unique(); - out << sp << nl << "final static String[] __ops ="; + out << sp << nl << "final static String[] _iceOps ="; out << sb; for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();) { @@ -1236,17 +1267,17 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) } } out << nl << "@Override" << nl - << "default java.util.concurrent.CompletionStage<com.zeroc.Ice.OutputStream> __dispatch(" - << "com.zeroc.IceInternal.Incoming in, com.zeroc.Ice.Current __current)"; + << "default java.util.concurrent.CompletionStage<com.zeroc.Ice.OutputStream> _iceDispatch(" + << "com.zeroc.IceInternal.Incoming in, com.zeroc.Ice.Current current)"; out.inc(); out << nl << "throws com.zeroc.Ice.UserException"; out.dec(); out << sb; - out << nl << "int pos = java.util.Arrays.binarySearch(__ops, __current.operation);"; + out << nl << "int pos = java.util.Arrays.binarySearch(_iceOps, current.operation);"; out << nl << "if(pos < 0)"; out << sb; out << nl << "throw new " - << "com.zeroc.Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);"; + << "com.zeroc.Ice.OperationNotExistException(current.id, current.facet, current.operation);"; out << eb; out << sp << nl << "switch(pos)"; out << sb; @@ -1259,19 +1290,19 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << sb; if(opName == "ice_id") { - out << nl << "return com.zeroc.Ice.Object.___ice_id(this, in, __current);"; + out << nl << "return com.zeroc.Ice.Object._iceD_ice_id(this, in, current);"; } else if(opName == "ice_ids") { - out << nl << "return com.zeroc.Ice.Object.___ice_ids(this, in, __current);"; + out << nl << "return com.zeroc.Ice.Object._iceD_ice_ids(this, in, current);"; } else if(opName == "ice_isA") { - out << nl << "return com.zeroc.Ice.Object.___ice_isA(this, in, __current);"; + out << nl << "return com.zeroc.Ice.Object._iceD_ice_isA(this, in, current);"; } else if(opName == "ice_ping") { - out << nl << "return com.zeroc.Ice.Object.___ice_ping(this, in, __current);"; + out << nl << "return com.zeroc.Ice.Object._iceD_ice_ping(this, in, current);"; } else { @@ -1287,7 +1318,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) assert(cl); if(cl->scoped() == p->scoped()) { - out << nl << "return ___" << opName << "(this, in, __current);"; + out << nl << "return _iceD_" << opName << "(this, in, current);"; } else { @@ -1300,7 +1331,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) { base = getAbsolute(cl, package, "_", "Disp"); } - out << nl << "return " << base << ".___" << opName << "(this, in, __current);"; + out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);"; } break; } @@ -1311,7 +1342,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << eb; out << sp << nl << "assert(false);"; out << nl << "throw new " - << "com.zeroc.Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);"; + << "com.zeroc.Ice.OperationNotExistException(current.id, current.facet, current.operation);"; out << eb; // @@ -1330,7 +1361,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) if(!attributesMap.empty()) { - out << sp << nl << "final static int[] __operationAttributes ="; + out << sp << nl << "final static int[] _iceOperationAttributes ="; out << sb; for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();) { @@ -1352,12 +1383,12 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << sp << nl << "@Override" << nl << "default int ice_operationAttributes(String operation)"; out << sb; - out << nl << "int pos = java.util.Arrays.binarySearch(__ops, operation);"; + out << nl << "int pos = java.util.Arrays.binarySearch(_iceOps, operation);"; out << nl << "if(pos < 0)"; out << sb; out << nl << "return -1;"; out << eb; - out << sp << nl << "return __operationAttributes[pos];"; + out << sp << nl << "return _iceOperationAttributes[pos];"; out << eb; } } @@ -1386,28 +1417,28 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p) { out << sp; out << nl << "@Override"; - out << nl << "public void __write(com.zeroc.Ice.OutputStream __os)"; + out << nl << "public void _iceWrite(com.zeroc.Ice.OutputStream ostr)"; out << sb; - out << nl << "__os.startValue(__slicedData);"; - out << nl << "__writeImpl(__os);"; - out << nl << "__os.endValue();"; + out << nl << "ostr.startValue(_iceSlicedData);"; + out << nl << "_iceWriteImpl(ostr);"; + out << nl << "ostr.endValue();"; out << eb; out << sp; out << nl << "@Override"; - out << nl << "public void __read(com.zeroc.Ice.InputStream __is)"; + out << nl << "public void _iceRead(com.zeroc.Ice.InputStream istr)"; out << sb; - out << nl << "__is.startValue();"; - out << nl << "__readImpl(__is);"; - out << nl << "__slicedData = __is.endValue(true);"; + out << nl << "istr.startValue();"; + out << nl << "_iceReadImpl(istr);"; + out << nl << "_iceSlicedData = istr.endValue(true);"; out << eb; } out << sp; out << nl << "@Override"; - out << nl << "protected void __writeImpl(com.zeroc.Ice.OutputStream __os)"; + out << nl << "protected void _iceWriteImpl(com.zeroc.Ice.OutputStream ostr_)"; out << sb; - out << nl << "__os.startSlice(ice_staticId, " << p->compactId() << (!base ? ", true" : ", false") << ");"; + out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -1420,10 +1451,10 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p) { writeMarshalDataMember(out, package, *d, iter); } - out << nl << "__os.endSlice();"; + out << nl << "ostr_.endSlice();"; if(base) { - out << nl << "super.__writeImpl(__os);"; + out << nl << "super._iceWriteImpl(ostr_);"; } out << eb; @@ -1432,9 +1463,9 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p) out << sp; out << nl << "@Override"; - out << nl << "protected void __readImpl(com.zeroc.Ice.InputStream __is)"; + out << nl << "protected void _iceReadImpl(com.zeroc.Ice.InputStream istr_)"; out << sb; - out << nl << "__is.startSlice();"; + out << nl << "istr_.startSlice();"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) @@ -1449,16 +1480,16 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p) writeUnmarshalDataMember(out, package, *d, iter); } - out << nl << "__is.endSlice();"; + out << nl << "istr_.endSlice();"; if(base) { - out << nl << "super.__readImpl(__is);"; + out << nl << "super._iceReadImpl(istr_);"; } out << eb; if(preserved && !basePreserved) { - out << sp << nl << "protected com.zeroc.Ice.SlicedData __slicedData;"; + out << sp << nl << "protected com.zeroc.Ice.SlicedData _iceSlicedData;"; } } @@ -1875,7 +1906,7 @@ Slice::JavaVisitor::writeProxyDocComment(Output& out, const OperationPtr& p, con return; } - const string contextParam = " * @param __ctx The Context map to send with the invocation."; + const string contextParam = " * @param context The Context map to send with the invocation."; out << nl << "/**"; if(!dc->overview.empty()) @@ -1989,7 +2020,9 @@ Slice::JavaVisitor::writeServantDocComment(Output& out, const OperationPtr& p, c return; } - const string currentParam = " * @param __current The Current object for the invocation."; + const ParamDeclList paramList = p->inParameters(); + const string currentParamName = getEscapedParamName(p, "current"); + const string currentParam = " * @param " + currentParamName + " The Current object for the invocation."; out << nl << "/**"; if(!dc->overview.empty()) @@ -2001,7 +2034,6 @@ Slice::JavaVisitor::writeServantDocComment(Output& out, const OperationPtr& p, c // // Show in-params in order of declaration, but only those with docs. // - const ParamDeclList paramList = p->inParameters(); for(ParamDeclList::const_iterator i = paramList.begin(); i != paramList.end(); ++i) { const string name = (*i)->name(); @@ -2493,24 +2525,17 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!p->isLocal()) { - out << sp << nl; - if(!p->isInterface()) - { - out << "public "; - } - out << "static final String ice_staticId = \"" << p->scoped() << "\";"; - if(!p->isInterface()) { out << sp << nl << "public static String ice_staticId()"; out << sb; - out << nl << "return ice_staticId;"; + out << nl << "return \"" << p->scoped() << "\";"; out << eb; out << sp << nl << "@Override"; out << nl << "public String ice_id()"; out << sb; - out << nl << "return ice_staticId;"; + out << nl << "return ice_staticId();"; out << eb; } } @@ -2715,9 +2740,9 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) out << eb; out << sp; - out << nl << "public " << name << "(Throwable __cause)"; + out << nl << "public " << name << "(Throwable cause)"; out << sb; - out << nl << "super(__cause);"; + out << nl << "super(cause);"; writeDataMemberInitializers(out, members, package); out << eb; @@ -2812,7 +2837,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) // if(allDataMembers.size() < 254) { - paramDecl.push_back("Throwable __cause"); + paramDecl.push_back("Throwable cause"); out << sp << nl << "public " << name << spar; out << paramDecl << epar; out << sb; @@ -2827,12 +2852,12 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) baseParamNames.push_back(fixKwd((*d)->name())); } } - baseParamNames.push_back("__cause"); + baseParamNames.push_back("cause"); out << baseParamNames << epar << ';'; } else { - out << nl << "super(__cause);"; + out << nl << "super(cause);"; } for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -2891,13 +2916,13 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) // if(allDataMembers.size() < 254) { - paramDecl.push_back("Throwable __cause"); + paramDecl.push_back("Throwable cause"); out << sp << nl << "public " << name << spar; out << paramDecl << epar; out << sb; if(!base) { - out << nl << "super(__cause);"; + out << nl << "super(cause);"; } else { @@ -2908,7 +2933,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) { baseParamNames.push_back(fixKwd((*d)->name())); } - baseParamNames.push_back("__cause"); + baseParamNames.push_back("cause"); out << baseParamNames << epar << ';'; } for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) @@ -2960,28 +2985,28 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { out << sp; out << nl << "@Override"; - out << nl << "public void __write(com.zeroc.Ice.OutputStream __os)"; + out << nl << "public void _write(com.zeroc.Ice.OutputStream ostr)"; out << sb; - out << nl << "__os.startException(__slicedData);"; - out << nl << "__writeImpl(__os);"; - out << nl << "__os.endException();"; + out << nl << "ostr.startException(_slicedData);"; + out << nl << "_writeImpl(ostr);"; + out << nl << "ostr.endException();"; out << eb; out << sp; out << nl << "@Override"; - out << nl << "public void __read(com.zeroc.Ice.InputStream __is)"; + out << nl << "public void _read(com.zeroc.Ice.InputStream istr)"; out << sb; - out << nl << "__is.startException();"; - out << nl << "__readImpl(__is);"; - out << nl << "__slicedData = __is.endException(true);"; + out << nl << "istr.startException();"; + out << nl << "_readImpl(istr);"; + out << nl << "_slicedData = istr.endException(true);"; out << eb; } out << sp; out << nl << "@Override"; - out << nl << "protected void __writeImpl(com.zeroc.Ice.OutputStream __os)"; + out << nl << "protected void _writeImpl(com.zeroc.Ice.OutputStream ostr_)"; out << sb; - out << nl << "__os.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");"; + out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -2994,10 +3019,10 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { writeMarshalDataMember(out, package, *d, iter); } - out << nl << "__os.endSlice();"; + out << nl << "ostr_.endSlice();"; if(base) { - out << nl << "super.__writeImpl(__os);"; + out << nl << "super._writeImpl(ostr_);"; } out << eb; @@ -3006,9 +3031,9 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) out << sp; out << nl << "@Override"; - out << nl << "protected void __readImpl(com.zeroc.Ice.InputStream __is)"; + out << nl << "protected void _readImpl(com.zeroc.Ice.InputStream istr_)"; out << sb; - out << nl << "__is.startSlice();"; + out << nl << "istr_.startSlice();"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -3021,10 +3046,10 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { writeUnmarshalDataMember(out, package, *d, iter); } - out << nl << "__is.endSlice();"; + out << nl << "istr_.endSlice();"; if(base) { - out << nl << "super.__readImpl(__is);"; + out << nl << "super._readImpl(istr_);"; } out << eb; @@ -3034,7 +3059,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { out << sp; out << nl << "@Override"; - out << nl << "public boolean __usesClasses()"; + out << nl << "public boolean _usesClasses()"; out << sb; out << nl << "return true;"; out << eb; @@ -3043,7 +3068,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(preserved && !basePreserved) { - out << sp << nl << "protected com.zeroc.Ice.SlicedData __slicedData;"; + out << sp << nl << "protected com.zeroc.Ice.SlicedData _slicedData;"; } } @@ -3165,12 +3190,12 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) out << sb; out << nl << "return true;"; out << eb; - out << nl << typeS << " _r = null;"; + out << nl << typeS << " r = null;"; out << nl << "if(rhs instanceof " << typeS << ")"; out << sb; - out << nl << "_r = (" << typeS << ")rhs;"; + out << nl << "r = (" << typeS << ")rhs;"; out << eb; - out << sp << nl << "if(_r != null)"; + out << sp << nl << "if(r != null)"; out << sb; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -3188,7 +3213,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) case Builtin::KindFloat: case Builtin::KindDouble: { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; out << nl << "return false;"; out << eb; @@ -3201,10 +3226,10 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) case Builtin::KindLocalObject: case Builtin::KindValue: { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; - out << nl << "if(" << memberName << " == null || _r." << memberName << " == null || !" - << memberName << ".equals(_r." << memberName << "))"; + out << nl << "if(this." << memberName << " == null || r." << memberName << " == null || !this." + << memberName << ".equals(r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3228,10 +3253,10 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) { if(hasTypeMetaData(seq, (*d)->getMetaData())) { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; - out << nl << "if(" << memberName << " == null || _r." << memberName << " == null || !" - << memberName << ".equals(_r." << memberName << "))"; + out << nl << "if(this." << memberName << " == null || r." << memberName << " == null || !this." + << memberName << ".equals(r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3242,7 +3267,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) // // Arrays.equals() handles null values. // - out << nl << "if(!java.util.Arrays.equals(" << memberName << ", _r." << memberName << "))"; + out << nl << "if(!java.util.Arrays.equals(this." << memberName << ", r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3250,10 +3275,10 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } else { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; - out << nl << "if(" << memberName << " == null || _r." << memberName << " == null || !" - << memberName << ".equals(_r." << memberName << "))"; + out << nl << "if(this." << memberName << " == null || r." << memberName << " == null || !this." + << memberName << ".equals(r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3268,15 +3293,15 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) out << sp << nl << "public int hashCode()"; out << sb; - out << nl << "int __h = 5381;"; - out << nl << "__h = com.zeroc.IceInternal.HashUtil.hashAdd(__h, \"" << p->scoped() << "\");"; + out << nl << "int h_ = 5381;"; + out << nl << "h_ = com.zeroc.IceInternal.HashUtil.hashAdd(h_, \"" << p->scoped() << "\");"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { string memberName = fixKwd((*d)->name()); - out << nl << "__h = com.zeroc.IceInternal.HashUtil.hashAdd(__h, " << memberName << ");"; + out << nl << "h_ = com.zeroc.IceInternal.HashUtil.hashAdd(h_, " << memberName << ");"; } - out << nl << "return __h;"; + out << nl << "return h_;"; out << eb; out << sp << nl << "public " << name << " clone()"; @@ -3295,49 +3320,49 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(!p->isLocal()) { - out << sp << nl << "public void ice_write(com.zeroc.Ice.OutputStream __os)"; + out << sp << nl << "public void write(com.zeroc.Ice.OutputStream ostr)"; out << sb; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { - writeMarshalDataMember(out, package, *d, iter); + writeMarshalDataMember(out, package, *d, iter, true); } out << eb; DataMemberList classMembers = p->classDataMembers(); - out << sp << nl << "public void ice_read(com.zeroc.Ice.InputStream __is)"; + out << sp << nl << "public void read(com.zeroc.Ice.InputStream istr)"; out << sb; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { - writeUnmarshalDataMember(out, package, *d, iter); + writeUnmarshalDataMember(out, package, *d, iter, true); } out << eb; - out << sp << nl << "static public void write(com.zeroc.Ice.OutputStream __os, " << name << " __v)"; + out << sp << nl << "static public void write(com.zeroc.Ice.OutputStream ostr, " << name << " v)"; out << sb; - out << nl << "if(__v == null)"; + out << nl << "if(v == null)"; out << sb; - out << nl << "__nullMarshalValue.ice_write(__os);"; + out << nl << "_nullMarshalValue.write(ostr);"; out << eb; out << nl << "else"; out << sb; - out << nl << "__v.ice_write(__os);"; + out << nl << "v.write(ostr);"; out << eb; out << eb; - out << sp << nl << "static public " << name << " read(com.zeroc.Ice.InputStream __is, " << name << " __v)"; + out << sp << nl << "static public " << name << " read(com.zeroc.Ice.InputStream istr, " << name << " v)"; out << sb; - out << nl << "if(__v == null)"; + out << nl << "if(v == null)"; out << sb; - out << nl << " __v = new " << name << "();"; + out << nl << " v = new " << name << "();"; out << eb; - out << nl << "__v.ice_read(__is);"; - out << nl << "return __v;"; + out << nl << "v.read(istr);"; + out << nl << "return v;"; out << eb; - out << nl << nl << "private static final " << name << " __nullMarshalValue = new " << name << "();"; + out << nl << nl << "private static final " << name << " _nullMarshalValue = new " << name << "();"; } out << sp << nl << "public static final long serialVersionUID = "; @@ -3444,7 +3469,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) if(optional) { - out << nl << "private boolean __has_" << p->name() << ';'; + out << nl << "private boolean _" << p->name() << ';'; } // @@ -3492,7 +3517,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.util.NoSuchElementException(\"" << name << " is not set\");"; out << eb; @@ -3509,13 +3534,13 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) { out << nl << "@Deprecated"; } - out << nl << "public void set" << capName << '(' << s << " _" << name << ')'; + out << nl << "public void set" << capName << '(' << s << " " << name << ')'; out << sb; if(optional) { - out << nl << "__has_" << p->name() << " = true;"; + out << nl << "_" << p->name() << " = true;"; } - out << nl << name << " = _" << name << ';'; + out << nl << "this." << name << " = " << name << ';'; out << eb; // @@ -3531,7 +3556,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) } out << nl << "public boolean has" << capName << "()"; out << sb; - out << nl << "return __has_" << p->name() << ';'; + out << nl << "return _" << p->name() << ';'; out << eb; out << sp; @@ -3542,7 +3567,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) } out << nl << "public void clear" << capName << "()"; out << sb; - out << nl << "__has_" << p->name() << " = false;"; + out << nl << "_" << p->name() << " = false;"; out << eb; const string optType = @@ -3554,30 +3579,30 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) { out << nl << "@Deprecated"; } - out << nl << "public void optional" << capName << '(' << optType << " __v)"; + out << nl << "public void optional" << capName << '(' << optType << " v)"; out << sb; - out << nl << "if(__v == null || !__v.isPresent())"; + out << nl << "if(v == null || !v.isPresent())"; out << sb; - out << nl << "__has_" << p->name() << " = false;"; + out << nl << "_" << p->name() << " = false;"; out << eb; out << nl << "else"; out << sb; - out << nl << "__has_" << p->name() << " = true;"; + out << nl << "_" << p->name() << " = true;"; if(b && b->kind() == Builtin::KindInt) { - out << nl << name << " = __v.getAsInt();"; + out << nl << name << " = v.getAsInt();"; } else if(b && b->kind() == Builtin::KindLong) { - out << nl << name << " = __v.getAsLong();"; + out << nl << name << " = v.getAsLong();"; } else if(b && b->kind() == Builtin::KindDouble) { - out << nl << name << " = __v.getAsDouble();"; + out << nl << name << " = v.getAsDouble();"; } else { - out << nl << name << " = __v.get();"; + out << nl << name << " = v.get();"; } out << eb; out << eb; @@ -3590,7 +3615,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) } out << nl << "public " << optType << " optional" << capName << "()"; out << sb; - out << nl << "if(__has_" << p->name() << ')'; + out << nl << "if(_" << p->name() << ')'; out << sb; if(classType) { @@ -3653,7 +3678,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.util.NoSuchElementException(\"" << name << " is not set\");"; out << eb; @@ -3688,16 +3713,16 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) { out << nl << "@Deprecated"; } - out << nl << "public " << elem << " get" << capName << "(int _index)"; + out << nl << "public " << elem << " get" << capName << "(int index)"; out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.util.NoSuchElementException(\"" << name << " is not set\");"; out << eb; } - out << nl << "return " << name << "[_index];"; + out << nl << "return this." << name << "[index];"; out << eb; // @@ -3708,16 +3733,16 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) { out << nl << "@Deprecated"; } - out << nl << "public void set" << capName << "(int _index, " << elem << " _val)"; + out << nl << "public void set" << capName << "(int index, " << elem << " val)"; out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.util.NoSuchElementException(\"" << name << " is not set\");"; out << eb; } - out << nl << name << "[_index] = _val;"; + out << nl << "this." << name << "[index] = val;"; out << eb; } } @@ -3769,12 +3794,12 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) out << sp << nl << "public int value()"; out << sb; - out << nl << "return __value;"; + out << nl << "return _value;"; out << eb; - out << sp << nl << "public static " << name << " valueOf(int __v)"; + out << sp << nl << "public static " << name << " valueOf(int v)"; out << sb; - out << nl << "switch(__v)"; + out << nl << "switch(v)"; out << sb; out.dec(); for(EnumeratorList::const_iterator en = enumerators.begin(); en != enumerators.end(); ++en) @@ -3789,50 +3814,49 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) out << nl << "return null;"; out << eb; - out << sp << nl << "private" - << nl << name << "(int __v)"; + out << sp << nl << "private " << name << "(int v)"; out << sb; - out << nl << "__value = __v;"; + out << nl << "_value = v;"; out << eb; if(!p->isLocal()) { - out << sp << nl << "public void" << nl << "ice_write(com.zeroc.Ice.OutputStream __os)"; + out << sp << nl << "public void write(com.zeroc.Ice.OutputStream ostr)"; out << sb; - out << nl << "__os.writeEnum(value(), " << p->maxValue() << ");"; + out << nl << "ostr.writeEnum(_value, " << p->maxValue() << ");"; out << eb; - out << sp << nl << "public static void write(com.zeroc.Ice.OutputStream __os, " << name << " __v)"; + out << sp << nl << "public static void write(com.zeroc.Ice.OutputStream ostr, " << name << " v)"; out << sb; - out << nl << "if(__v == null)"; + out << nl << "if(v == null)"; out << sb; string firstEnum = fixKwd(enumerators.front()->name()); - out << nl << "__os.writeEnum(" << absolute << '.' << firstEnum << ".value(), " << p->maxValue() << ");"; + out << nl << "ostr.writeEnum(" << absolute << '.' << firstEnum << ".value(), " << p->maxValue() << ");"; out << eb; out << nl << "else"; out << sb; - out << nl << "__os.writeEnum(__v.value(), " << p->maxValue() << ");"; + out << nl << "ostr.writeEnum(v.value(), " << p->maxValue() << ");"; out << eb; out << eb; - out << sp << nl << "public static " << name << " read(com.zeroc.Ice.InputStream __is)"; + out << sp << nl << "public static " << name << " read(com.zeroc.Ice.InputStream istr)"; out << sb; - out << nl << "int __v = __is.readEnum(" << p->maxValue() << ");"; - out << nl << "return __validate(__v);"; + out << nl << "int v = istr.readEnum(" << p->maxValue() << ");"; + out << nl << "return validate(v);"; out << eb; - out << sp << nl << "private static " << name << " __validate(int __v)"; + out << sp << nl << "private static " << name << " validate(int v)"; out << sb; - out << nl << "final " << name << " __e = valueOf(__v);"; - out << nl << "if(__e == null)"; + out << nl << "final " << name << " e = valueOf(v);"; + out << nl << "if(e == null)"; out << sb; - out << nl << "throw new com.zeroc.Ice.MarshalException(\"enumerator value \" + __v + \" is out of range\");"; + out << nl << "throw new com.zeroc.Ice.MarshalException(\"enumerator value \" + v + \" is out of range\");"; out << eb; - out << nl << "return __e;"; + out << nl << "return e;"; out << eb; } - out << sp << nl << "private final int __value;"; + out << sp << nl << "private final int _value;"; out << eb; close(); @@ -4014,10 +4038,10 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p) out << sp << nl << "public final class " << name << "Helper"; out << sb; - out << nl << "public static void write(com.zeroc.Ice.OutputStream __os, " << typeS << " __v)"; + out << nl << "public static void write(com.zeroc.Ice.OutputStream ostr, " << typeS << " v)"; out << sb; iter = 0; - writeSequenceMarshalUnmarshalCode(out, package, p, "__v", true, iter, false); + writeSequenceMarshalUnmarshalCode(out, package, p, "v", true, iter, false); out << eb; out << sp; @@ -4025,12 +4049,12 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p) { out << nl << "@SuppressWarnings(\"unchecked\")"; } - out << nl << "public static " << typeS << " read(com.zeroc.Ice.InputStream __is)"; + out << nl << "public static " << typeS << " read(com.zeroc.Ice.InputStream istr)"; out << sb; - out << nl << typeS << " __v;"; + out << nl << typeS << " v;"; iter = 0; - writeSequenceMarshalUnmarshalCode(out, package, p, "__v", false, iter, false); - out << nl << "return __v;"; + writeSequenceMarshalUnmarshalCode(out, package, p, "v", false, iter, false); + out << nl << "return v;"; out << eb; out << eb; @@ -4066,18 +4090,18 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) out << sp << nl << "public final class " << name << "Helper"; out << sb; - out << nl << "public static void write(com.zeroc.Ice.OutputStream __os, " << formalType << " __v)"; + out << nl << "public static void write(com.zeroc.Ice.OutputStream ostr, " << formalType << " v)"; out << sb; iter = 0; - writeDictionaryMarshalUnmarshalCode(out, package, p, "__v", true, iter, false); + writeDictionaryMarshalUnmarshalCode(out, package, p, "v", true, iter, false); out << eb; - out << sp << nl << "public static " << formalType << " read(com.zeroc.Ice.InputStream __is)"; + out << sp << nl << "public static " << formalType << " read(com.zeroc.Ice.InputStream istr)"; out << sb; - out << nl << formalType << " __v;"; + out << nl << formalType << " v;"; iter = 0; - writeDictionaryMarshalUnmarshalCode(out, package, p, "__v", false, iter, false); - out << nl << "return __v;"; + writeDictionaryMarshalUnmarshalCode(out, package, p, "v", false, iter, false); + out << nl << "return v;"; out << eb; out << eb; @@ -4165,17 +4189,17 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) DocCommentPtr dc = parseDocComment(p); - const string contextParam = "java.util.Map<String, String> __ctx"; + const string contextParam = "java.util.Map<String, String> context"; out << sp; writeDocComment(out, "Contacts the remote server to verify that the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" + "@param obj The untyped proxy.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx __obj)"; + out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx obj)"; out << sb; - out << nl << "return com.zeroc.Ice.ObjectPrx.__checkedCast(__obj, ice_staticId, " << p->name() + out << nl << "return com.zeroc.Ice.ObjectPrx._checkedCast(obj, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);"; out << eb; @@ -4183,12 +4207,12 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) writeDocComment(out, "Contacts the remote server to verify that the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" - "@param __ctx The Context map to send with the invocation.\n" + "@param obj The untyped proxy.\n" + "@param context The Context map to send with the invocation.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx __obj, " << contextParam << ')'; + out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx obj, " << contextParam << ')'; out << sb; - out << nl << "return com.zeroc.Ice.ObjectPrx.__checkedCast(__obj, __ctx, ice_staticId, " << p->name() + out << nl << "return com.zeroc.Ice.ObjectPrx._checkedCast(obj, context, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);"; out << eb; @@ -4196,12 +4220,12 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) writeDocComment(out, "Contacts the remote server to verify that a facet of the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" - "@param __facet The name of the desired facet.\n" + "@param obj The untyped proxy.\n" + "@param facet The name of the desired facet.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx __obj, String __facet)"; + out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx obj, String facet)"; out << sb; - out << nl << "return com.zeroc.Ice.ObjectPrx.__checkedCast(__obj, __facet, ice_staticId, " << p->name() + out << nl << "return com.zeroc.Ice.ObjectPrx._checkedCast(obj, facet, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);"; out << eb; @@ -4209,37 +4233,37 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) writeDocComment(out, "Contacts the remote server to verify that a facet of the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" - "@param __facet The name of the desired facet.\n" - "@param __ctx The Context map to send with the invocation.\n" + "@param obj The untyped proxy.\n" + "@param facet The name of the desired facet.\n" + "@param context The Context map to send with the invocation.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx __obj, String __facet, " + out << nl << "static " << p->name() << "Prx checkedCast(com.zeroc.Ice.ObjectPrx obj, String facet, " << contextParam << ')'; out << sb; - out << nl << "return com.zeroc.Ice.ObjectPrx.__checkedCast(__obj, __facet, __ctx, ice_staticId, " << p->name() + out << nl << "return com.zeroc.Ice.ObjectPrx._checkedCast(obj, facet, context, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);"; out << eb; out << sp; writeDocComment(out, "Downcasts the given proxy to this type without contacting the remote server.\n" - "@param __obj The untyped proxy.\n" + "@param obj The untyped proxy.\n" "@return A proxy for this type."); - out << nl << "static " << p->name() << "Prx uncheckedCast(com.zeroc.Ice.ObjectPrx __obj)"; + out << nl << "static " << p->name() << "Prx uncheckedCast(com.zeroc.Ice.ObjectPrx obj)"; out << sb; - out << nl << "return com.zeroc.Ice.ObjectPrx.__uncheckedCast(__obj, " << p->name() << "Prx.class, _" + out << nl << "return com.zeroc.Ice.ObjectPrx._uncheckedCast(obj, " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);"; out << eb; out << sp; writeDocComment(out, "Downcasts the given proxy to this type without contacting the remote server.\n" - "@param __obj The untyped proxy.\n" - "@param __facet The name of the desired facet.\n" + "@param obj The untyped proxy.\n" + "@param facet The name of the desired facet.\n" "@return A proxy for this type."); - out << nl << "static " << p->name() << "Prx uncheckedCast(com.zeroc.Ice.ObjectPrx __obj, String __facet)"; + out << nl << "static " << p->name() << "Prx uncheckedCast(com.zeroc.Ice.ObjectPrx obj, String facet)"; out << sb; - out << nl << "return com.zeroc.Ice.ObjectPrx.__uncheckedCast(__obj, __facet, " << p->name() << "Prx.class, _" + out << nl << "return com.zeroc.Ice.ObjectPrx._uncheckedCast(obj, facet, " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);"; out << eb; @@ -4251,7 +4275,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_context(java.util.Map<String, String> newContext)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_context(newContext);"; + out << nl << "return (" << p->name() << "Prx)_ice_context(newContext);"; out << eb; out << sp; @@ -4262,7 +4286,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_adapterId(String newAdapterId)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_adapterId(newAdapterId);"; + out << nl << "return (" << p->name() << "Prx)_ice_adapterId(newAdapterId);"; out << eb; out << sp; @@ -4273,7 +4297,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_endpoints(com.zeroc.Ice.Endpoint[] newEndpoints)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_endpoints(newEndpoints);"; + out << nl << "return (" << p->name() << "Prx)_ice_endpoints(newEndpoints);"; out << eb; out << sp; @@ -4284,7 +4308,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_locatorCacheTimeout(int newTimeout)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_locatorCacheTimeout(newTimeout);"; + out << nl << "return (" << p->name() << "Prx)_ice_locatorCacheTimeout(newTimeout);"; out << eb; out << sp; @@ -4295,7 +4319,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_invocationTimeout(int newTimeout)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_invocationTimeout(newTimeout);"; + out << nl << "return (" << p->name() << "Prx)_ice_invocationTimeout(newTimeout);"; out << eb; out << sp; @@ -4306,7 +4330,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_connectionCached(boolean newCache)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_connectionCached(newCache);"; + out << nl << "return (" << p->name() << "Prx)_ice_connectionCached(newCache);"; out << eb; out << sp; @@ -4317,7 +4341,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_endpointSelection(com.zeroc.Ice.EndpointSelectionType newType)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_endpointSelection(newType);"; + out << nl << "return (" << p->name() << "Prx)_ice_endpointSelection(newType);"; out << eb; out << sp; @@ -4330,7 +4354,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_secure(boolean b)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_secure(b);"; + out << nl << "return (" << p->name() << "Prx)_ice_secure(b);"; out << eb; out << sp; @@ -4341,7 +4365,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_encodingVersion(com.zeroc.Ice.EncodingVersion e)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_encodingVersion(e);"; + out << nl << "return (" << p->name() << "Prx)_ice_encodingVersion(e);"; out << eb; out << sp; @@ -4354,7 +4378,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_preferSecure(boolean b)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_preferSecure(b);"; + out << nl << "return (" << p->name() << "Prx)_ice_preferSecure(b);"; out << eb; out << sp; @@ -4365,7 +4389,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_router(com.zeroc.Ice.RouterPrx router)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_router(router);"; + out << nl << "return (" << p->name() << "Prx)_ice_router(router);"; out << eb; out << sp; @@ -4376,7 +4400,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_locator(com.zeroc.Ice.LocatorPrx locator)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_locator(locator);"; + out << nl << "return (" << p->name() << "Prx)_ice_locator(locator);"; out << eb; out << sp; @@ -4387,7 +4411,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_collocationOptimized(boolean b)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_collocationOptimized(b);"; + out << nl << "return (" << p->name() << "Prx)_ice_collocationOptimized(b);"; out << eb; out << sp; @@ -4397,7 +4421,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_twoway()"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_twoway();"; + out << nl << "return (" << p->name() << "Prx)_ice_twoway();"; out << eb; out << sp; @@ -4407,7 +4431,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_oneway()"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_oneway();"; + out << nl << "return (" << p->name() << "Prx)_ice_oneway();"; out << eb; out << sp; @@ -4417,7 +4441,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_batchOneway()"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_batchOneway();"; + out << nl << "return (" << p->name() << "Prx)_ice_batchOneway();"; out << eb; out << sp; @@ -4427,7 +4451,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_datagram()"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_datagram();"; + out << nl << "return (" << p->name() << "Prx)_ice_datagram();"; out << eb; out << sp; @@ -4437,7 +4461,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_batchDatagram()"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_batchDatagram();"; + out << nl << "return (" << p->name() << "Prx)_ice_batchDatagram();"; out << eb; out << sp; @@ -4448,7 +4472,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_compress(boolean co)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_compress(co);"; + out << nl << "return (" << p->name() << "Prx)_ice_compress(co);"; out << eb; out << sp; @@ -4459,7 +4483,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_timeout(int t)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_timeout(t);"; + out << nl << "return (" << p->name() << "Prx)_ice_timeout(t);"; out << eb; out << sp; @@ -4470,15 +4494,13 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) out << nl << "@Override"; out << nl << "default " << p->name() << "Prx ice_connectionId(String connectionId)"; out << sb; - out << nl << "return (" << p->name() << "Prx)__ice_connectionId(connectionId);"; + out << nl << "return (" << p->name() << "Prx)_ice_connectionId(connectionId);"; out << eb; out << sp; - out << nl << "final static String ice_staticId = \"" << p->scoped() << "\";"; - out << sp; out << nl << "static String ice_staticId()"; out << sb; - out << nl << "return ice_staticId;"; + out << nl << "return \"" << p->scoped() << "\";"; out << eb; out << eb; @@ -4541,8 +4563,9 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) throws.sort(Slice::DerivedToBaseCompare()); #endif - const string contextDoc = "@param __ctx The Context map to send with the invocation."; - const string contextParam = "java.util.Map<String, String> __ctx"; + const string contextParamName = getEscapedParamName(p, "context"); + const string contextDoc = "@param " + contextParamName +" The Context map to send with the invocation."; + const string contextParam = "java.util.Map<String, String> " + contextParamName; const string noExplicitContextArg = "com.zeroc.Ice.ObjectPrx.noExplicitContext"; DocCommentPtr dc = parseDocComment(p); @@ -4583,7 +4606,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) { out << "return "; } - out << "__" << p->name() << "Async" << spar << args << "__ctx" << "true" << epar << ".__wait();"; + out << "_iceI_" << p->name() << "Async" << spar << args << contextParamName << "true" << epar << ".waitForResponse();"; } else { @@ -4594,19 +4617,19 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) { out << "return "; } - out << "__" << p->name() << "Async" << spar << args << "__ctx" << "true" << epar << ".__waitUserEx();"; + out << "_iceI_" << p->name() << "Async" << spar << args << contextParamName << "true" << epar << ".waitForResponseOrUserEx();"; out << eb; for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) { string exS = getAbsolute(*t, package); - out << nl << "catch(" << exS << " __ex)"; + out << nl << "catch(" << exS << " ex)"; out << sb; - out << nl << "throw __ex;"; + out << nl << "throw ex;"; out << eb; } - out << nl << "catch(com.zeroc.Ice.UserException __ex)"; + out << nl << "catch(com.zeroc.Ice.UserException ex)"; out << sb; - out << nl << "throw new com.zeroc.Ice.UnknownUserException(__ex.ice_id(), __ex);"; + out << nl << "throw new com.zeroc.Ice.UnknownUserException(ex.ice_id(), ex);"; out << eb; } out << eb; @@ -4649,7 +4672,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) { out << "return "; } - out << "__" << p->name() << "Async" << spar << args << "__ctx" << "true" << epar << ".__wait();"; + out << "_iceI_" << p->name() << "Async" << spar << args << contextParamName << "true" << epar << ".waitForResponse();"; } else { @@ -4660,19 +4683,19 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) { out << "return "; } - out << "__" << p->name() << "Async" << spar << args << "__ctx" << "true" << epar << ".__waitUserEx();"; + out << "_iceI_" << p->name() << "Async" << spar << args << contextParamName << "true" << epar << ".waitForResponseOrUserEx();"; out << eb; for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) { string exS = getAbsolute(*t, package); - out << nl << "catch(" << exS << " __ex)"; + out << nl << "catch(" << exS << " ex)"; out << sb; - out << nl << "throw __ex;"; + out << nl << "throw ex;"; out << eb; } - out << nl << "catch(com.zeroc.Ice.UserException __ex)"; + out << nl << "catch(com.zeroc.Ice.UserException ex)"; out << sb; - out << nl << "throw new com.zeroc.Ice.UnknownUserException(__ex.ice_id(), __ex);"; + out << nl << "throw new com.zeroc.Ice.UnknownUserException(ex.ice_id(), ex);"; out << eb; } out << eb; @@ -4692,7 +4715,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } out << nl << "default " << future << ' ' << p->name() << "Async" << spar << params << epar; out << sb; - out << nl << "return __" << p->name() << "Async" << spar << args << noExplicitContextArg << "false" << epar << ';'; + out << nl << "return _iceI_" << p->name() << "Async" << spar << args << noExplicitContextArg << "false" << epar << ';'; out << eb; out << sp; @@ -4704,26 +4727,27 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } out << nl << "default " << future << ' ' << p->name() << "Async" << spar << params << contextParam << epar; out << sb; - out << nl << "return __" << p->name() << "Async" << spar << args << "__ctx" << "false" << epar << ';'; + out << nl << "return _iceI_" << p->name() << "Async" << spar << args << "context" << "false" << epar << ';'; out << eb; const string futureImpl = getFutureImplType(p, package); out << sp; - out << nl << "default " << futureImpl << " __" << p->name() << "Async" << spar << params << contextParam - << "boolean __sync" << epar; + out << nl << "default " << futureImpl << " _iceI_" << p->name() << "Async" << spar << getParamsProxy(p, package, false, true) + << "java.util.Map<String, String> context" + << "boolean sync" << epar; out << sb; - out << nl << futureImpl << " __f = new com.zeroc.IceInternal.OutgoingAsync<>(this, \"" << p->name() << "\", " - << sliceModeToIceMode(p->sendMode()) << ", __sync, " - << (throws.empty() ? "null" : "__" + p->name() + "_ex") << ");"; + out << nl << futureImpl << " f = new com.zeroc.IceInternal.OutgoingAsync<>(this, \"" << p->name() << "\", " + << sliceModeToIceMode(p->sendMode()) << ", sync, " + << (throws.empty() ? "null" : "_iceE_" + p->name()) << ");"; - out << nl << "__f.invoke("; + out << nl << "f.invoke("; out.useCurrentPosAsIndent(); - out << (p->returnsData() ? "true" : "false") << ", __ctx, " << opFormatTypeToString(p) + out << (p->returnsData() ? "true" : "false") << ", context, " << opFormatTypeToString(p) << ", "; if(!p->inParameters().empty()) { - out << "__os -> {"; + out << "ostr -> {"; out.inc(); writeMarshalProxyParams(out, package, p, false); out.dec(); @@ -4736,7 +4760,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) out << ", "; if(returnsParams) { - out << "__is -> {"; + out << "istr -> {"; out.inc(); writeUnmarshalProxyResults(out, package, p); out.dec(); @@ -4748,12 +4772,12 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } out.restoreIndent(); out << ");"; - out << nl << "return __f;"; + out << nl << "return f;"; out << eb; if(!throws.empty()) { - out << sp << nl << "static final Class<?>[] __" << p->name() << "_ex ="; + out << sp << nl << "static final Class<?>[] _iceE_" << p->name() << " ="; out << sb; for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) { @@ -4779,7 +4803,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } out << nl << "default " << future << ' ' << p->name() << "Async" << spar << paramsOpt << epar; out << sb; - out << nl << "return __" << p->name() << "Async" << spar << args << noExplicitContextArg << "false" << epar + out << nl << "return _iceI_" << p->name() << "Async" << spar << args << noExplicitContextArg << "false" << epar << ';'; out << eb; @@ -4792,23 +4816,24 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } out << nl << "default " << future << ' ' << p->name() << "Async" << spar << paramsOpt << contextParam << epar; out << sb; - out << nl << "return __" << p->name() << "Async" << spar << args << "__ctx" << "false" << epar << ';'; + out << nl << "return _iceI_" << p->name() << "Async" << spar << args << contextParamName << "false" << epar << ';'; out << eb; out << sp; - out << nl << "default " << futureImpl << " __" << p->name() << "Async" << spar << paramsOpt << contextParam - << "boolean __sync" << epar; + out << nl << "default " << futureImpl << " _iceI_" << p->name() << "Async" << spar << getParamsProxy(p, package, true, true) + << "java.util.Map<String, String> context" + << "boolean sync" << epar; out << sb; - out << nl << futureImpl << " __f = new com.zeroc.IceInternal.OutgoingAsync<>(this, \"" << p->name() << "\", " - << sliceModeToIceMode(p->sendMode()) << ", __sync, " - << (throws.empty() ? "null" : "__" + p->name() + "_ex") << ");"; + out << nl << futureImpl << " f = new com.zeroc.IceInternal.OutgoingAsync<>(this, \"" << p->name() << "\", " + << sliceModeToIceMode(p->sendMode()) << ", sync, " + << (throws.empty() ? "null" : "_iceE_" + p->name()) << ");"; - out << nl << "__f.invoke("; + out << nl << "f.invoke("; out.useCurrentPosAsIndent(); - out << (p->returnsData() ? "true" : "false") << ", __ctx, " << opFormatTypeToString(p) << ", "; + out << (p->returnsData() ? "true" : "false") << ", context, " << opFormatTypeToString(p) << ", "; if(!p->inParameters().empty()) { - out << "__os -> {"; + out << "ostr -> {"; out.inc(); writeMarshalProxyParams(out, package, p, true); out.dec(); @@ -4821,7 +4846,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) out << ", "; if(returnsParams) { - out << "__is -> {"; + out << "istr -> {"; out.inc(); writeUnmarshalProxyResults(out, package, p); out.dec(); @@ -4833,7 +4858,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } out.restoreIndent(); out << ");"; - out << nl << "return __f;"; + out << nl << "return f;"; out << eb; } } @@ -5064,7 +5089,7 @@ Slice::Gen::ImplVisitor::initResult(Output& out, const string& package, const Op if(op->hasMarshaledResult()) { - out << nl << retS << " __r = new " << retS << spar; + out << nl << retS << " r = new " << retS << spar; const ParamDeclList outParams = op->outParameters(); if(op->returnType()) { @@ -5074,16 +5099,16 @@ Slice::Gen::ImplVisitor::initResult(Output& out, const string& package, const Op { out << getDefaultValue(package, (*p)->type(), (*p)->optional()); } - out << "__current" << epar << ';'; + out << "current" << epar << ';'; } else if(op->returnsMultipleValues()) { - out << nl << retS << " __r = new " << retS << "();"; + out << nl << retS << " r = new " << retS << "();"; string retval = "returnValue"; const ParamDeclList outParams = op->outParameters(); for(ParamDeclList::const_iterator p = outParams.begin(); p != outParams.end(); ++p) { - out << nl << "__r." << fixKwd((*p)->name()) << " = " + out << nl << "r." << fixKwd((*p)->name()) << " = " << getDefaultValue(package, (*p)->type(), (*p)->optional()) << ';'; if((*p)->name() == "returnValue") { @@ -5092,7 +5117,7 @@ Slice::Gen::ImplVisitor::initResult(Output& out, const string& package, const Op } if(op->returnType()) { - out << nl << "__r." << retval << " = " + out << nl << "r." << retval << " = " << getDefaultValue(package, op->returnType(), op->returnIsOptional()) << ';'; } } @@ -5112,7 +5137,7 @@ Slice::Gen::ImplVisitor::initResult(Output& out, const string& package, const Op } if(type) { - out << nl << retS << " __r = " << getDefaultValue(package, type, optional) << ';'; + out << nl << retS << " r = " << getDefaultValue(package, type, optional) << ';'; } else { @@ -5135,6 +5160,7 @@ Slice::Gen::ImplVisitor::writeOperation(Output& out, const string& package, cons const ContainerPtr container = op->container(); const ClassDefPtr cl = ClassDefPtr::dynamicCast(container); const vector<string> params = getParams(op, package); + const string currentParam = "com.zeroc.Ice.Current " + getEscapedParamName(op, "current"); if(local) { @@ -5155,7 +5181,7 @@ Slice::Gen::ImplVisitor::writeOperation(Output& out, const string& package, cons out << sb; if(initResult(out, package, op)) { - out << nl << "return __r;"; + out << nl << "return r;"; } out << eb; @@ -5179,12 +5205,12 @@ Slice::Gen::ImplVisitor::writeOperation(Output& out, const string& package, cons out << sp; out << nl << "@Override"; out << nl << "public java.util.concurrent.CompletionStage<" << retS << "> " << opName << "Async" << spar - << params << "com.zeroc.Ice.Current __current" << epar; + << params << currentParam << epar; writeThrowsClause(package, throws); out << sb; if(initResult(out, package, op)) { - out << nl << "return java.util.concurrent.CompletableFuture.completedFuture(__r);"; + out << nl << "return java.util.concurrent.CompletableFuture.completedFuture(r);"; } else { @@ -5197,12 +5223,12 @@ Slice::Gen::ImplVisitor::writeOperation(Output& out, const string& package, cons out << sp; out << nl << "@Override"; out << nl << "public " << getResultType(op, package, false, true) << ' ' << fixKwd(opName) << spar << params - << "com.zeroc.Ice.Current __current" << epar; + << currentParam << epar; writeThrowsClause(package, throws); out << sb; if(initResult(out, package, op)) { - out << nl << "return __r;"; + out << nl << "return r;"; } out << eb; } diff --git a/cpp/src/slice2java/Gen.h b/cpp/src/slice2java/Gen.h index 102a71633f9..5e6046bcd85 100644 --- a/cpp/src/slice2java/Gen.h +++ b/cpp/src/slice2java/Gen.h @@ -56,7 +56,7 @@ protected: // Compose the parameter lists for an operation. // std::vector<std::string> getParams(const OperationPtr&, const std::string&); - std::vector<std::string> getParamsProxy(const OperationPtr&, const std::string&, bool); + std::vector<std::string> getParamsProxy(const OperationPtr&, const std::string&, bool, bool = false); // // Compose the argument lists for an operation. @@ -83,8 +83,8 @@ protected: // // Marshal/unmarshal a data member. // - void writeMarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&); - void writeUnmarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&); + void writeMarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&, bool = false); + void writeUnmarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&, bool = false); // // Generate dispatch methods for a class or interface. diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp index 43205b19db6..d5894291f3e 100644 --- a/cpp/src/slice2java/GenCompat.cpp +++ b/cpp/src/slice2java/GenCompat.cpp @@ -75,6 +75,35 @@ opFormatTypeToString(const OperationPtr& op) } string +getEscapedParamName(const OperationPtr& p, const string& name) +{ + ParamDeclList params = p->parameters(); + + for(ParamDeclList::const_iterator i = params.begin(); i != params.end(); ++i) + { + if((*i)->name() == name) + { + return name + "_"; + } + } + return name; +} + +string +getEscapedParamName(const DataMemberList& params, const string& name) +{ + for(DataMemberList::const_iterator i = params.begin(); i != params.end(); ++i) + { + if((*i)->name() == name) + { + return name + "_"; + } + } + return name; +} + + +string getDeprecateReason(const ContainedPtr& p1, const ContainedPtr& p2, const string& type) { string deprecateMetadata, deprecateReason; @@ -209,7 +238,7 @@ Slice::JavaCompatVisitor::getParams(const OperationPtr& op, const string& packag } vector<string> -Slice::JavaCompatVisitor::getParamsProxy(const OperationPtr& op, const string& package, bool final, bool optionalMapping) +Slice::JavaCompatVisitor::getParamsProxy(const OperationPtr& op, const string& package, bool final, bool optionalMapping, bool internal) { vector<string> params; @@ -233,7 +262,7 @@ Slice::JavaCompatVisitor::getParamsProxy(const OperationPtr& op, const string& p { typeString = "final " + typeString; } - params.push_back(typeString + ' ' + fixKwd((*q)->name())); + params.push_back(typeString + ' ' + (internal ? "iceP_" + (*q)->name() : fixKwd((*q)->name()))); } return params; @@ -241,7 +270,7 @@ Slice::JavaCompatVisitor::getParamsProxy(const OperationPtr& op, const string& p vector<string> Slice::JavaCompatVisitor::getInOutParams(const OperationPtr& op, const string& package, ParamDir paramType, bool /*proxy*/, - bool optionalMapping) + bool optionalMapping, bool internal) { vector<string> params; @@ -253,7 +282,7 @@ Slice::JavaCompatVisitor::getInOutParams(const OperationPtr& op, const string& p bool optional = optionalMapping && (*q)->optional(); string typeString = typeToString((*q)->type(), paramType == InParam ? TypeModeIn : TypeModeOut, package, (*q)->getMetaData(), true, optional); - params.push_back(typeString + ' ' + fixKwd((*q)->name())); + params.push_back(typeString + ' ' + (internal ? "iceP_" + (*q)->name() : fixKwd((*q)->name()))); } } @@ -269,7 +298,7 @@ Slice::JavaCompatVisitor::getParamsAsync(const OperationPtr& op, const string& p ContainerPtr container = op->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); string classNameAsync = getAbsolute(cl, package, amd ? "AMD_" : "AMI_", '_' + name); - params.insert(params.begin(), classNameAsync + " __cb"); + params.insert(params.begin(), classNameAsync + " " + getEscapedParamName(op, "cb")); return params; } @@ -284,7 +313,7 @@ Slice::JavaCompatVisitor::getParamsAsyncCB(const OperationPtr& op, const string& { string retS = typeToString(ret, TypeModeIn, package, op->getMetaData(), true, optionalMapping && op->returnIsOptional()); - params.push_back(retS + " __ret"); + params.push_back(retS + " ret"); } ParamDeclList paramList = op->parameters(); @@ -497,32 +526,45 @@ Slice::JavaCompatVisitor::getLambdaResponseCB(const OperationPtr& op, const stri vector<string> Slice::JavaCompatVisitor::getParamsAsyncLambda(const OperationPtr& op, const string& package, bool context, bool sentCB, - bool optionalMapping, bool inParams) + bool optionalMapping, bool inParams, bool internal) { vector<string> params; + string contextParamName = "context"; + string responseCbParamName = "responseCb"; + string userExceptionCbParamName = "userExceptionCb"; + string exceptionCbParamName = "exceptionCb"; + string sentCbParamName = "sentCb"; if(inParams) { - params = getInOutParams(op, package, InParam, false, optionalMapping); + params = getInOutParams(op, package, InParam, false, optionalMapping, internal); + if(!internal) + { + contextParamName = getEscapedParamName(op, contextParamName); + responseCbParamName = getEscapedParamName(op, responseCbParamName); + userExceptionCbParamName = getEscapedParamName(op, userExceptionCbParamName); + exceptionCbParamName = getEscapedParamName(op, exceptionCbParamName); + sentCbParamName = getEscapedParamName(op, sentCbParamName); + } } if(context) { - params.push_back("java.util.Map<String, String> __ctx"); + params.push_back("java.util.Map<String, String> " + contextParamName); } - params.push_back(getLambdaResponseCB(op, package) + " __responseCb"); + params.push_back(getLambdaResponseCB(op, package) + " " + responseCbParamName); if(!op->throws().empty()) { - params.push_back("IceInternal.Functional_GenericCallback1<Ice.UserException> __userExceptionCb"); + params.push_back("IceInternal.Functional_GenericCallback1<Ice.UserException> " + userExceptionCbParamName); } - params.push_back("IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb"); + params.push_back("IceInternal.Functional_GenericCallback1<Ice.Exception> " + exceptionCbParamName); if(sentCB) { - params.push_back("IceInternal.Functional_BoolCallback __sentCb"); + params.push_back("IceInternal.Functional_BoolCallback " + sentCbParamName); } return params; @@ -532,16 +574,25 @@ vector<string> Slice::JavaCompatVisitor::getArgsAsyncLambda(const OperationPtr& op, const string& package, bool context, bool sentCB) { vector<string> args = getInOutArgs(op, InParam); - args.push_back(context ? "__ctx" : "null"); + + // "internal" is always false for this function + + const string contextParamName = getEscapedParamName(op, "context"); + const string responseCbParamName = getEscapedParamName(op, "responseCb"); + const string userExceptionCbParamName = getEscapedParamName(op, "userExceptionCb"); + const string exceptionCbParamName = getEscapedParamName(op, "exceptionCb"); + const string sentCbParamName = getEscapedParamName(op, "sentCb"); + + args.push_back(context ? contextParamName : "null"); args.push_back(context ? "true" : "false"); - args.push_back("false"); // __synchronous - args.push_back("__responseCb"); + args.push_back("false"); // synchronous param + args.push_back(responseCbParamName); if(!op->throws().empty()) { - args.push_back("__userExceptionCb"); + args.push_back(userExceptionCbParamName); } - args.push_back("__exceptionCb"); - args.push_back(sentCB ? "__sentCb" : "null"); + args.push_back(exceptionCbParamName); + args.push_back(sentCB ? sentCbParamName : "null"); return args; } @@ -560,7 +611,7 @@ Slice::JavaCompatVisitor::getArgs(const OperationPtr& op) } vector<string> -Slice::JavaCompatVisitor::getInOutArgs(const OperationPtr& op, ParamDir paramType) +Slice::JavaCompatVisitor::getInOutArgs(const OperationPtr& op, ParamDir paramType, bool internal) { vector<string> args; @@ -569,7 +620,7 @@ Slice::JavaCompatVisitor::getInOutArgs(const OperationPtr& op, ParamDir paramTyp { if((*q)->isOutParam() == (paramType == OutParam)) { - args.push_back(fixKwd((*q)->name())); + args.push_back(internal ? "iceP_" + (*q)->name() : fixKwd((*q)->name())); } } @@ -580,7 +631,7 @@ vector<string> Slice::JavaCompatVisitor::getArgsAsync(const OperationPtr& op) { vector<string> args = getInOutArgs(op, InParam); - args.insert(args.begin(), "__cb"); + args.insert(args.begin(), getEscapedParamName(op, "cb")); return args; } @@ -595,11 +646,11 @@ Slice::JavaCompatVisitor::getArgsAsyncCB(const OperationPtr& op) BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { - args.push_back("__ret.value"); + args.push_back("ret.value"); } else { - args.push_back("__ret"); + args.push_back("ret"); } } @@ -625,9 +676,15 @@ Slice::JavaCompatVisitor::getArgsAsyncCB(const OperationPtr& op) void Slice::JavaCompatVisitor::writeMarshalUnmarshalParams(Output& out, const string& package, const ParamDeclList& params, - const OperationPtr& op, int& iter, bool marshal, bool optionalMapping, - bool dispatch) + const OperationPtr& op, int& iter, bool marshal, bool optionalMapping, + bool internal, const string& customRetName, bool dispatch) { + string stream = ""; + if(!internal) + { + stream = marshal ? "ostr_" : "istr_"; + } + ParamDeclList optionals; for(ParamDeclList::const_iterator pli = params.begin(); pli != params.end(); ++pli) { @@ -637,7 +694,7 @@ Slice::JavaCompatVisitor::writeMarshalUnmarshalParams(Output& out, const string& } else { - string paramName = fixKwd((*pli)->name()); + string paramName = internal ? "iceP_" + (*pli)->name() : fixKwd((*pli)->name()); bool holder = marshal == dispatch; string patchParams; if(!marshal) @@ -645,10 +702,16 @@ Slice::JavaCompatVisitor::writeMarshalUnmarshalParams(Output& out, const string& patchParams = paramName; } writeMarshalUnmarshalCode(out, package, (*pli)->type(), OptionalNone, false, 0, paramName, marshal, - iter, holder, (*pli)->getMetaData(), patchParams); + iter, holder, stream, (*pli)->getMetaData(), patchParams); } } + string retName = customRetName; + if(retName.empty()) + { + retName = internal ? "ret" : "ret_"; + } + TypePtr ret; bool returnsObject = false; @@ -667,27 +730,27 @@ Slice::JavaCompatVisitor::writeMarshalUnmarshalParams(Output& out, const string& { if(optional) { - out << nl << retS << " __ret = new " << retS << "();"; + out << nl << retS << " " << retName << " = new " << retS << "();"; } else if(returnsObject) { - out << nl << retS << "Holder __ret = new " << retS << "Holder();"; + out << nl << retS << "Holder " << retName << " = new " << retS << "Holder();"; holder = true; } else if(StructPtr::dynamicCast(ret)) { - out << nl << retS << " __ret = null;"; + out << nl << retS << " " << retName << " = null;"; } else { - out << nl << retS << " __ret;"; + out << nl << retS << " " << retName << ";"; } } if(!op->returnIsOptional()) { - writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, "__ret", marshal, iter, holder, - op->getMetaData()); + writeMarshalUnmarshalCode(out, package, ret, OptionalNone, false, 0, retName, marshal, iter, holder, + stream, op->getMetaData()); } } @@ -714,7 +777,7 @@ Slice::JavaCompatVisitor::writeMarshalUnmarshalParams(Output& out, const string& if(checkReturnType && op->returnTag() < (*pli)->tag()) { writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, optionalMapping, op->returnTag(), - "__ret", marshal, iter, false, op->getMetaData()); + retName, marshal, iter, false, stream, op->getMetaData()); checkReturnType = false; } @@ -722,13 +785,14 @@ Slice::JavaCompatVisitor::writeMarshalUnmarshalParams(Output& out, const string& writeMarshalUnmarshalCode(out, package, (*pli)->type(), (*pli)->isOutParam() ? OptionalOutParam : OptionalInParam, optionalMapping, - (*pli)->tag(), fixKwd((*pli)->name()), marshal, iter, holder, (*pli)->getMetaData()); + (*pli)->tag(), internal ? "iceP_" + (*pli)->name() : fixKwd((*pli)->name()), + marshal, iter, holder, stream, (*pli)->getMetaData()); } if(checkReturnType) { - writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, optionalMapping, op->returnTag(), "__ret", - marshal, iter, false, op->getMetaData()); + writeMarshalUnmarshalCode(out, package, ret, OptionalReturnParam, optionalMapping, op->returnTag(), retName, + marshal, iter, false, stream, op->getMetaData()); } } @@ -757,27 +821,35 @@ Slice::JavaCompatVisitor::writeThrowsClause(const string& package, const Excepti } void -Slice::JavaCompatVisitor::writeMarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter) +Slice::JavaCompatVisitor::writeMarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter, bool forStruct) { if(!member->optional()) { - writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, fixKwd(member->name()), - true, iter, false, member->getMetaData()); + string stream = forStruct ? "" : "ostr_"; + string memberName = fixKwd(member->name()); + if(forStruct) + { + memberName = "this." + memberName; + } + + writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, memberName, + true, iter, false, stream, member->getMetaData()); } else { - out << nl << "if(__has_" << member->name() << " && __os.writeOptional(" << member->tag() << ", " + assert(!forStruct); + out << nl << "if(_" << member->name() << " && ostr_.writeOptional(" << member->tag() << ", " << getOptionalFormat(member->type()) << "))"; out << sb; writeMarshalUnmarshalCode(out, package, member->type(), OptionalMember, false, 0, fixKwd(member->name()), true, - iter, false, member->getMetaData()); + iter, false, "ostr_", member->getMetaData()); out << eb; } } void Slice::JavaCompatVisitor::writeUnmarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, - int& iter, bool needPatcher, int& patchIter) + int& iter, bool needPatcher, int& patchIter, bool forStruct) { string patchParams; if(needPatcher) @@ -793,23 +865,31 @@ Slice::JavaCompatVisitor::writeUnmarshalDataMember(Output& out, const string& pa if(!member->optional()) { - writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, fixKwd(member->name()), false, - iter, false, member->getMetaData(), patchParams); + string stream = forStruct ? "" : "istr_"; + string memberName = fixKwd(member->name()); + if(forStruct) + { + memberName = "this." + memberName; + } + + writeMarshalUnmarshalCode(out, package, member->type(), OptionalNone, false, 0, memberName, false, + iter, false, stream, member->getMetaData(), patchParams); } else { - out << nl << "if(__has_" << member->name() << " = __is.readOptional(" << member->tag() << ", " + assert(!forStruct); + out << nl << "if(_" << member->name() << " = istr_.readOptional(" << member->tag() << ", " << getOptionalFormat(member->type()) << "))"; out << sb; writeMarshalUnmarshalCode(out, package, member->type(), OptionalMember, false, 0, fixKwd(member->name()), false, - iter, false, member->getMetaData(), patchParams); + iter, false, "istr_", member->getMetaData(), patchParams); out << eb; } } void Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const DataMemberList& classMembers, - const DataMemberList& optionalMembers) + const DataMemberList& optionalMembers) { out << sp << nl << "private class Patcher implements Ice.ReadValueCallback"; out << sb; @@ -817,7 +897,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const { out << sp << nl << "Patcher(int member)"; out << sb; - out << nl << "__member = member;"; + out << nl << "_member = member;"; out << eb; } @@ -825,7 +905,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const out << sb; if(classMembers.size() > 1) { - out << nl << "switch(__member)"; + out << nl << "switch(_member)"; out << sb; } int memberCount = 0; @@ -849,11 +929,11 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const out.inc(); if(b) { - out << nl << "__typeId = Ice.ObjectImpl.ice_staticId();"; + out << nl << "_typeId = Ice.ObjectImpl.ice_staticId();"; } else { - out << nl << "__typeId = \"" << (*d)->type()->typeId() << "\";"; + out << nl << "_typeId = \"" << (*d)->type()->typeId() << "\";"; } } @@ -903,11 +983,11 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const out.inc(); if(b) { - out << nl << "__typeId = Ice.ObjectImpl.ice_staticId();"; + out << nl << "_typeId = Ice.ObjectImpl.ice_staticId();"; } else { - out << nl << "__typeId = \"" << (*d)->type()->typeId() << "\";"; + out << nl << "_typeId = \"" << (*d)->type()->typeId() << "\";"; } } @@ -950,7 +1030,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const out << sb; if(classMembers.size() > 1) { - out << nl << "return __typeId;"; + out << nl << "return _typeId;"; } else { @@ -960,8 +1040,8 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const if(classMembers.size() > 1) { - out << sp << nl << "private int __member;"; - out << nl << "private String __typeId;"; + out << sp << nl << "private int _member;"; + out << nl << "private String _typeId;"; } out << eb; @@ -994,7 +1074,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe assert(scopedIter != ids.end()); StringList::difference_type scopedPos = ::IceUtilInternal::distance(firstIter, scopedIter); - out << sp << nl << "public static final String[] __ids ="; + out << sp << nl << "private static final String[] _ids ="; out << sb; for(StringList::const_iterator q = ids.begin(); q != ids.end();) @@ -1009,37 +1089,37 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe out << sp << nl << "public boolean ice_isA(String s)"; out << sb; - out << nl << "return java.util.Arrays.binarySearch(__ids, s) >= 0;"; + out << nl << "return java.util.Arrays.binarySearch(_ids, s) >= 0;"; out << eb; - out << sp << nl << "public boolean ice_isA(String s, Ice.Current __current)"; + out << sp << nl << "public boolean ice_isA(String s, Ice.Current current)"; out << sb; - out << nl << "return java.util.Arrays.binarySearch(__ids, s) >= 0;"; + out << nl << "return java.util.Arrays.binarySearch(_ids, s) >= 0;"; out << eb; out << sp << nl << "public String[] ice_ids()"; out << sb; - out << nl << "return __ids;"; + out << nl << "return _ids;"; out << eb; - out << sp << nl << "public String[] ice_ids(Ice.Current __current)"; + out << sp << nl << "public String[] ice_ids(Ice.Current current)"; out << sb; - out << nl << "return __ids;"; + out << nl << "return _ids;"; out << eb; out << sp << nl << "public String ice_id()"; out << sb; - out << nl << "return __ids[" << scopedPos << "];"; + out << nl << "return _ids[" << scopedPos << "];"; out << eb; - out << sp << nl << "public String ice_id(Ice.Current __current)"; + out << sp << nl << "public String ice_id(Ice.Current current)"; out << sb; - out << nl << "return __ids[" << scopedPos << "];"; + out << nl << "return _ids[" << scopedPos << "];"; out << eb; out << sp << nl << "public static String ice_staticId()"; out << sb; - out << nl << "return __ids[" << scopedPos << "];"; + out << nl << "return _ids[" << scopedPos << "];"; out << eb; OperationList ops = p->allOperations(); @@ -1185,8 +1265,8 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe { out << nl << "/** @deprecated **/"; } - out << nl << "public static boolean ___" << opName << '(' << name - << " __obj, IceInternal.Incoming __inS, Ice.Current __current)"; + out << nl << "public static boolean _iceD_" << opName << '(' << name + << " obj, IceInternal.Incoming inS, Ice.Current current)"; out.inc(); out << nl << "throws Ice.UserException"; out.dec(); @@ -1217,18 +1297,18 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe int iter; - out << nl << "__checkMode(" << sliceModeToIceMode(op->mode()) << ", __current.mode);"; + out << nl << "_iceCheckMode(" << sliceModeToIceMode(op->mode()) << ", current.mode);"; if(!inParams.empty()) { // // Unmarshal 'in' parameters. // - out << nl << "Ice.InputStream __is = __inS.startReadParams();"; + out << nl << "Ice.InputStream istr = inS.startReadParams();"; for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli) { TypePtr paramType = (*pli)->type(); - string paramName = fixKwd((*pli)->name()); + string paramName = "iceP_" + (*pli)->name(); string typeS = typeToString(paramType, TypeModeIn, package, (*pli)->getMetaData(), true, (*pli)->optional()); if((*pli)->optional()) @@ -1253,20 +1333,20 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe } } iter = 0; - writeMarshalUnmarshalParams(out, package, inParams, 0, iter, false, true, true); + writeMarshalUnmarshalParams(out, package, inParams, 0, iter, false, true, true, "", true); if(op->sendsClasses(false)) { - out << nl << "__is.readPendingValues();"; + out << nl << "istr.readPendingValues();"; } - out << nl << "__inS.endReadParams();"; + out << nl << "inS.endReadParams();"; } else { - out << nl << "__inS.readEmptyParams();"; + out << nl << "inS.readEmptyParams();"; } if(op->format() != DefaultFormat) { - out << nl << "__inS.setFormat(" << opFormatTypeToString(op) << ");"; + out << nl << "inS.setFormat(" << opFormatTypeToString(op) << ");"; } // @@ -1276,7 +1356,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe { string typeS = typeToString((*pli)->type(), TypeModeOut, package, (*pli)->getMetaData(), true, optionalMapping && (*pli)->optional()); - out << nl << typeS << ' ' << fixKwd((*pli)->name()) << " = new " << typeS << "();"; + out << nl << typeS << " iceP_" << (*pli)->name() << " = new " << typeS << "();"; } // @@ -1287,13 +1367,13 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe { string retS = typeToString(ret, TypeModeReturn, package, opMetaData, true, optionalMapping && op->returnIsOptional()); - out << retS << " __ret = "; + out << retS << " ret = "; } - out << "__obj." << fixKwd(opName) << '('; + out << "obj." << fixKwd(opName) << '('; for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli) { TypePtr paramType = (*pli)->type(); - out << fixKwd((*pli)->name()); + out << "iceP_" << (*pli)->name(); if(!(*pli)->optional()) { BuiltinPtr builtin = BuiltinPtr::dynamicCast(paramType); @@ -1306,26 +1386,26 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe } for(ParamDeclList::const_iterator pli = outParams.begin(); pli != outParams.end(); ++pli) { - out << fixKwd((*pli)->name()) << ", "; + out << "iceP_" << (*pli)->name() << ", "; } - out << "__current);"; + out << "current);"; // // Marshal 'out' parameters and return value. // if(!outParams.empty() || ret) { - out << nl << "Ice.OutputStream __os = __inS.startWriteParams();"; - writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true); + out << nl << "Ice.OutputStream ostr = inS.startWriteParams();"; + writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true, "", true); if(op->returnsClasses(false)) { - out << nl << "__os.writePendingValues();"; + out << nl << "ostr.writePendingValues();"; } - out << nl << "__inS.endWriteParams();"; + out << nl << "inS.endWriteParams();"; } else { - out << nl << "__inS.writeEmptyParams();"; + out << nl << "inS.writeEmptyParams();"; } out << nl << "return false;"; @@ -1345,19 +1425,19 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe int iter; - out << nl << "__checkMode(" << sliceModeToIceMode(op->mode()) << ", __current.mode);"; + out << nl << "_iceCheckMode(" << sliceModeToIceMode(op->mode()) << ", current.mode);"; if(!inParams.empty()) { // // Unmarshal 'in' parameters. // - out << nl << "Ice.InputStream __is = __inS.startReadParams();"; + out << nl << "Ice.InputStream istr = inS.startReadParams();"; iter = 0; for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli) { TypePtr paramType = (*pli)->type(); - string paramName = fixKwd((*pli)->name()); + string paramName = "iceP_" + (*pli)->name(); string typeS = typeToString(paramType, TypeModeIn, package, (*pli)->getMetaData(), true, (*pli)->optional()); if((*pli)->optional()) @@ -1381,33 +1461,33 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe } } } - writeMarshalUnmarshalParams(out, package, inParams, 0, iter, false, true, true); + writeMarshalUnmarshalParams(out, package, inParams, 0, iter, false, true, true, "", true); if(op->sendsClasses(false)) { - out << nl << "__is.readPendingValues();"; + out << nl << "istr.readPendingValues();"; } - out << nl << "__inS.endReadParams();"; + out << nl << "inS.endReadParams();"; } else { - out << nl << "__inS.readEmptyParams();"; + out << nl << "inS.readEmptyParams();"; } if(op->format() != DefaultFormat) { - out << nl << "__inS.setFormat(" << opFormatTypeToString(op) << ");"; + out << nl << "inS.setFormat(" << opFormatTypeToString(op) << ");"; } // // Call on the servant. // string classNameAMD = "AMD_" + p->name(); - out << nl << classNameAMD << '_' << opName << " __cb = new _" << classNameAMD << '_' << opName - << "(__inS);"; - out << nl << "__obj." << (amd ? opName + "_async" : fixKwd(opName)) << (amd ? "(__cb, " : "("); + out << nl << classNameAMD << '_' << opName << " cb = new _" << classNameAMD << '_' << opName + << "(inS);"; + out << nl << "obj." << (amd ? opName + "_async" : fixKwd(opName)) << (amd ? "(cb, " : "("); for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli) { TypePtr paramType = (*pli)->type(); - out << fixKwd((*pli)->name()); + out << "iceP_" << (*pli)->name(); if(!(*pli)->optional()) { BuiltinPtr builtin = BuiltinPtr::dynamicCast(paramType); @@ -1418,7 +1498,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe } out << ", "; } - out << "__current);"; + out << "current);"; out << nl << "return true;"; out << eb; @@ -1437,7 +1517,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe allOpNames.sort(); allOpNames.unique(); - out << sp << nl << "private final static String[] __all ="; + out << sp << nl << "private final static String[] _all ="; out << sb; for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();) { @@ -1466,15 +1546,15 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe break; } } - out << nl << "public boolean __dispatch(IceInternal.Incoming in, Ice.Current __current)"; + out << nl << "public boolean _iceDispatch(IceInternal.Incoming in, Ice.Current current)"; out.inc(); out << nl << "throws Ice.UserException"; out.dec(); out << sb; - out << nl << "int pos = java.util.Arrays.binarySearch(__all, __current.operation);"; + out << nl << "int pos = java.util.Arrays.binarySearch(_all, current.operation);"; out << nl << "if(pos < 0)"; out << sb; - out << nl << "throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);"; + out << nl << "throw new Ice.OperationNotExistException(current.id, current.facet, current.operation);"; out << eb; out << sp << nl << "switch(pos)"; out << sb; @@ -1487,19 +1567,19 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe out << sb; if(opName == "ice_id") { - out << nl << "return ___ice_id(this, in, __current);"; + out << nl << "return _iceD_ice_id(this, in, current);"; } else if(opName == "ice_ids") { - out << nl << "return ___ice_ids(this, in, __current);"; + out << nl << "return _iceD_ice_ids(this, in, current);"; } else if(opName == "ice_isA") { - out << nl << "return ___ice_isA(this, in, __current);"; + out << nl << "return _iceD_ice_isA(this, in, current);"; } else if(opName == "ice_ping") { - out << nl << "return ___ice_ping(this, in, __current);"; + out << nl << "return _iceD_ice_ping(this, in, current);"; } else { @@ -1515,7 +1595,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe assert(cl); if(cl->scoped() == p->scoped()) { - out << nl << "return ___" << opName << "(this, in, __current);"; + out << nl << "return _iceD_" << opName << "(this, in, current);"; } else { @@ -1528,7 +1608,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe { base = getAbsolute(cl, package); } - out << nl << "return " << base << ".___" << opName << "(this, in, __current);"; + out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);"; } break; } @@ -1538,7 +1618,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe } out << eb; out << sp << nl << "assert(false);"; - out << nl << "throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);"; + out << nl << "throw new Ice.OperationNotExistException(current.id, current.facet, current.operation);"; out << eb; // @@ -1557,7 +1637,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe if(!attributesMap.empty()) { - out << sp << nl << "private final static int[] __operationAttributes ="; + out << sp << nl << "private final static int[] _operationAttributes ="; out << sb; for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();) { @@ -1579,12 +1659,12 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe out << sp << nl << "public int ice_operationAttributes(String operation)"; out << sb; - out << nl << "int pos = java.util.Arrays.binarySearch(__all, operation);"; + out << nl << "int pos = java.util.Arrays.binarySearch(_all, operation);"; out << nl << "if(pos < 0)"; out << sb; out << nl << "return -1;"; out << eb; - out << sp << nl << "return __operationAttributes[pos];"; + out << sp << nl << "return _operationAttributes[pos];"; out << eb; } } @@ -1597,24 +1677,24 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe if(preserved && !basePreserved) { - out << sp << nl << "public void __write(Ice.OutputStream __os)"; + out << sp << nl << "public void _iceWrite(Ice.OutputStream ostr)"; out << sb; - out << nl << "__os.startValue(__slicedData);"; - out << nl << "__writeImpl(__os);"; - out << nl << "__os.endValue();"; + out << nl << "ostr.startValue(_iceSlicedData);"; + out << nl << "_iceWriteImpl(ostr);"; + out << nl << "ostr.endValue();"; out << eb; - out << sp << nl << "public void __read(Ice.InputStream __is)"; + out << sp << nl << "public void _iceRead(Ice.InputStream istr)"; out << sb; - out << nl << "__is.startValue();"; - out << nl << "__readImpl(__is);"; - out << nl << "__slicedData = __is.endValue(true);"; + out << nl << "istr.startValue();"; + out << nl << "_iceReadImpl(istr);"; + out << nl << "_iceSlicedData = istr.endValue(true);"; out << eb; } - out << sp << nl << "protected void __writeImpl(Ice.OutputStream __os)"; + out << sp << nl << "protected void _iceWriteImpl(Ice.OutputStream ostr_)"; out << sb; - out << nl << "__os.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");"; + out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -1627,10 +1707,10 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe { writeMarshalDataMember(out, package, *d, iter); } - out << nl << "__os.endSlice();"; + out << nl << "ostr_.endSlice();"; if(base) { - out << nl << "super.__writeImpl(__os);"; + out << nl << "super._iceWriteImpl(ostr_);"; } out << eb; @@ -1642,9 +1722,9 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe writePatcher(out, package, classMembers, optionalMembers); } - out << sp << nl << "protected void __readImpl(Ice.InputStream __is)"; + out << sp << nl << "protected void _iceReadImpl(Ice.InputStream istr_)"; out << sb; - out << nl << "__is.startSlice();"; + out << nl << "istr_.startSlice();"; int patchIter = 0; const bool needCustomPatcher = classMembers.size() > 1; @@ -1660,16 +1740,16 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe { writeUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter); } - out << nl << "__is.endSlice();"; + out << nl << "istr_.endSlice();"; if(base) { - out << nl << "super.__readImpl(__is);"; + out << nl << "super._iceReadImpl(istr_);"; } out << eb; if(preserved && !basePreserved) { - out << sp << nl << "protected Ice.SlicedData __slicedData;"; + out << sp << nl << "protected Ice.SlicedData _iceSlicedData;"; } } @@ -1970,7 +2050,7 @@ Slice::JavaCompatVisitor::writeDocCommentAsync(Output& out, const OperationPtr& if(i->find(returnTag) != string::npos) { foundReturn = true; - out << nl << " * @param __ret (return value)" << i->substr(returnTag.length()); + out << nl << " * @param ret (return value)" << i->substr(returnTag.length()); } } else @@ -2099,7 +2179,7 @@ Slice::JavaCompatVisitor::writeDocCommentAMI(Output& out, const OperationPtr& p, } else { - out << nl << " * @param __result The asynchronous result object."; + out << nl << " * @param result The asynchronous result object."; // // Print @return, @throws, and @see tags. // @@ -2153,7 +2233,7 @@ Slice::JavaCompatVisitor::writeDocCommentParam(Output& out, const OperationPtr& // if(cb && paramType == InParam) { - out << nl << " * @param __cb The callback object for the operation."; + out << nl << " * @param cb The callback object for the operation."; } // @@ -2419,9 +2499,11 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre string deprecateReason = getDeprecateReason(*r, p, "operation"); string extraCurrent; + string currentParamName = getEscapedParamName(op, "current"); + if(!noCurrent && !p->isLocal()) { - extraCurrent = "@param __current The Current object for the invocation."; + extraCurrent = "@param " + currentParamName + " The Current object for the invocation."; } if(amd) { @@ -2434,7 +2516,7 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre out << nl << retS << ' ' << (amd ? opname + "_async" : fixKwd(opname)) << spar << params; if(!noCurrent && !p->isLocal()) { - out << "Ice.Current __current"; + out << "Ice.Current " + currentParamName; } out << epar; if(op->hasMetaData("UserException")) @@ -2691,7 +2773,8 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { out << "public abstract "; } - out << "Ice.AsyncResult begin_" << opname << spar << inParams << "Ice.Callback __cb" << epar << ';'; + out << "Ice.AsyncResult begin_" << opname << spar << inParams << "Ice.Callback " + getEscapedParamName(op, "cb") + << epar << ';'; out << sp; writeDocCommentAMI(out, op, InParam); @@ -2700,10 +2783,9 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { out << "public abstract "; } - string cb = "Callback_" + name + "_" + opname + " __cb"; + string cb = "Callback_" + name + "_" + opname + " " + getEscapedParamName(op, "cb"); out << "Ice.AsyncResult begin_" << opname << spar << inParams << cb << epar << ';'; - out << sp; writeDocCommentAMI(out, op, InParam); out << nl; @@ -2724,7 +2806,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) out << "public abstract "; } - out << retS << " end_" << opname << spar << outParams << "Ice.AsyncResult __result" << epar << ';'; + out << retS << " end_" << opname << spar << outParams << "Ice.AsyncResult result" << epar << ';'; } } } @@ -2873,7 +2955,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) if(!p->isInterface() && p->allOperations().size() == 0 && !p->isLocal()) { out << sp; - out << nl << "private static class __F implements Ice.ValueFactory"; + out << nl << "private static class _F implements Ice.ValueFactory"; out << sb; out << nl << "public Ice.Object create(String type)"; out << sb; @@ -2881,7 +2963,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "return new " << fixKwd(name) << "();"; out << eb; out << eb; - out << nl << "private static Ice.ValueFactory _factory = new __F();"; + out << nl << "private static Ice.ValueFactory _factory = new _F();"; out << sp; out << nl << "public static Ice.ValueFactory" << nl << "ice_factory()"; out << sb; @@ -3036,9 +3118,9 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) out << eb; out << sp; - out << nl << "public " << name << "(Throwable __cause)"; + out << nl << "public " << name << "(Throwable cause)"; out << sb; - out << nl << "super(__cause);"; + out << nl << "super(cause);"; writeDataMemberInitializers(out, members, package); out << eb; @@ -3132,7 +3214,8 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) // if(allDataMembers.size() < 254) { - paramDecl.push_back("Throwable __cause"); + const string causeParamName = getEscapedParamName(allDataMembers, "cause"); + paramDecl.push_back("Throwable " + causeParamName); out << sp << nl << "public " << name << spar; out << paramDecl << epar; out << sb; @@ -3147,12 +3230,12 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) baseParamNames.push_back(fixKwd((*d)->name())); } } - baseParamNames.push_back("__cause"); + baseParamNames.push_back(causeParamName); out << baseParamNames << epar << ';'; } else { - out << nl << "super(__cause);"; + out << nl << "super(" << causeParamName << ");"; } for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -3210,13 +3293,14 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) // if(allDataMembers.size() < 254) { - paramDecl.push_back("Throwable __cause"); + const string causeParamName = getEscapedParamName(allDataMembers, "cause"); + paramDecl.push_back("Throwable " + causeParamName); out << sp << nl << "public " << name << spar; out << paramDecl << epar; out << sb; if(!base) { - out << nl << "super(__cause);"; + out << nl << "super(" << causeParamName << ");"; } else { @@ -3227,7 +3311,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) { baseParamNames.push_back(fixKwd((*d)->name())); } - baseParamNames.push_back("__cause"); + baseParamNames.push_back(causeParamName); out << baseParamNames << epar << ';'; } for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) @@ -3278,24 +3362,24 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(preserved && !basePreserved) { - out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __os)"; + out << sp << nl << "public void" << nl << "_write(Ice.OutputStream ostr)"; out << sb; - out << nl << "__os.startException(__slicedData);"; - out << nl << "__writeImpl(__os);"; - out << nl << "__os.endException();"; + out << nl << "ostr.startException(_slicedData);"; + out << nl << "_writeImpl(ostr);"; + out << nl << "ostr.endException();"; out << eb; - out << sp << nl << "public void" << nl << "__read(Ice.InputStream __is)"; + out << sp << nl << "public void" << nl << "_read(Ice.InputStream istr)"; out << sb; - out << nl << "__is.startException();"; - out << nl << "__readImpl(__is);"; - out << nl << "__slicedData = __is.endException(true);"; + out << nl << "istr.startException();"; + out << nl << "_readImpl(istr);"; + out << nl << "_slicedData = istr.endException(true);"; out << eb; } - out << sp << nl << "protected void" << nl << "__writeImpl(Ice.OutputStream __os)"; + out << sp << nl << "protected void" << nl << "_writeImpl(Ice.OutputStream ostr_)"; out << sb; - out << nl << "__os.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");"; + out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -3308,10 +3392,10 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { writeMarshalDataMember(out, package, *d, iter); } - out << nl << "__os.endSlice();"; + out << nl << "ostr_.endSlice();"; if(base) { - out << nl << "super.__writeImpl(__os);"; + out << nl << "super._writeImpl(ostr_);"; } out << eb; @@ -3322,9 +3406,9 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { writePatcher(out, package, classMembers, optionalMembers); } - out << sp << nl << "protected void" << nl << "__readImpl(Ice.InputStream __is)"; + out << sp << nl << "protected void" << nl << "_readImpl(Ice.InputStream istr_)"; out << sb; - out << nl << "__is.startSlice();"; + out << nl << "istr_.startSlice();"; iter = 0; int patchIter = 0; const bool needCustomPatcher = classMembers.size() > 1; @@ -3339,10 +3423,10 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { writeUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter); } - out << nl << "__is.endSlice();"; + out << nl << "istr_.endSlice();"; if(base) { - out << nl << "super.__readImpl(__is);"; + out << nl << "super._readImpl(istr_);"; } out << eb; @@ -3350,7 +3434,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { if(!base || (base && !base->usesClasses(false))) { - out << sp << nl << "public boolean" << nl << "__usesClasses()"; + out << sp << nl << "public boolean" << nl << "_usesClasses()"; out << sb; out << nl << "return true;"; out << eb; @@ -3359,7 +3443,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(preserved && !basePreserved) { - out << sp << nl << "protected Ice.SlicedData __slicedData;"; + out << sp << nl << "protected Ice.SlicedData _slicedData;"; } } @@ -3475,12 +3559,12 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) out << sb; out << nl << "return true;"; out << eb; - out << nl << typeS << " _r = null;"; + out << nl << typeS << " r = null;"; out << nl << "if(rhs instanceof " << typeS << ")"; out << sb; - out << nl << "_r = (" << typeS << ")rhs;"; + out << nl << "r = (" << typeS << ")rhs;"; out << eb; - out << sp << nl << "if(_r != null)"; + out << sp << nl << "if(r != null)"; out << sb; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { @@ -3498,7 +3582,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) case Builtin::KindFloat: case Builtin::KindDouble: { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; out << nl << "return false;"; out << eb; @@ -3511,10 +3595,10 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) case Builtin::KindLocalObject: case Builtin::KindValue: { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; - out << nl << "if(" << memberName << " == null || _r." << memberName << " == null || !" - << memberName << ".equals(_r." << memberName << "))"; + out << nl << "if(this." << memberName << " == null || r." << memberName << " == null || !this." + << memberName << ".equals(r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3538,10 +3622,10 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) { if(hasTypeMetaData(seq, (*d)->getMetaData())) { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; - out << nl << "if(" << memberName << " == null || _r." << memberName << " == null || !" - << memberName << ".equals(_r." << memberName << "))"; + out << nl << "if(this." << memberName << " == null || r." << memberName << " == null || !this." + << memberName << ".equals(r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3552,7 +3636,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) // // Arrays.equals() handles null values. // - out << nl << "if(!java.util.Arrays.equals(" << memberName << ", _r." << memberName << "))"; + out << nl << "if(!java.util.Arrays.equals(this." << memberName << ", r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3560,10 +3644,10 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) } else { - out << nl << "if(" << memberName << " != _r." << memberName << ')'; + out << nl << "if(this." << memberName << " != r." << memberName << ')'; out << sb; - out << nl << "if(" << memberName << " == null || _r." << memberName << " == null || !" - << memberName << ".equals(_r." << memberName << "))"; + out << nl << "if(this." << memberName << " == null || r." << memberName << " == null || !this." + << memberName << ".equals(r." << memberName << "))"; out << sb; out << nl << "return false;"; out << eb; @@ -3578,15 +3662,15 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) out << sp << nl << "public int" << nl << "hashCode()"; out << sb; - out << nl << "int __h = 5381;"; - out << nl << "__h = IceInternal.HashUtil.hashAdd(__h, \"" << p->scoped() << "\");"; + out << nl << "int h_ = 5381;"; + out << nl << "h_ = IceInternal.HashUtil.hashAdd(h_, \"" << p->scoped() << "\");"; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { string memberName = fixKwd((*d)->name()); - out << nl << "__h = IceInternal.HashUtil.hashAdd(__h, " << memberName << ");"; + out << nl << "h_ = IceInternal.HashUtil.hashAdd(h_, " << memberName << ");"; } - out << nl << "return __h;"; + out << nl << "return h_;"; out << eb; out << sp << nl << "public " << name << nl << "clone()"; @@ -3605,12 +3689,12 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) if(!p->isLocal()) { - out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __os)"; + out << sp << nl << "public void" << nl << "write(Ice.OutputStream ostr)"; out << sb; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { - writeMarshalDataMember(out, package, *d, iter); + writeMarshalDataMember(out, package, *d, iter, true); } out << eb; @@ -3621,40 +3705,40 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p) writePatcher(out, package, classMembers, DataMemberList()); } - out << sp << nl << "public void" << nl << "__read(Ice.InputStream __is)"; + out << sp << nl << "public void" << nl << "read(Ice.InputStream istr)"; out << sb; iter = 0; int patchIter = 0; const bool needCustomPatcher = classMembers.size() > 1; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) { - writeUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter); + writeUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter, true); } out << eb; - out << sp << nl << "static public void" << nl << "write(Ice.OutputStream __os, " << name << " __v)"; + out << sp << nl << "static public void" << nl << "write(Ice.OutputStream ostr, " << name << " v)"; out << sb; - out << nl << "if(__v == null)"; + out << nl << "if(v == null)"; out << sb; - out << nl << "__nullMarshalValue.__write(__os);"; + out << nl << "_nullMarshalValue.write(ostr);"; out << eb; out << nl << "else"; out << sb; - out << nl << "__v.__write(__os);"; + out << nl << "v.write(ostr);"; out << eb; out << eb; - out << sp << nl << "static public " << name << nl << "read(Ice.InputStream __is, " << name << " __v)"; + out << sp << nl << "static public " << name << nl << "read(Ice.InputStream istr, " << name << " v)"; out << sb; - out << nl << "if(__v == null)"; + out << nl << "if(v == null)"; out << sb; - out << nl << " __v = new " << name << "();"; + out << nl << " v = new " << name << "();"; out << eb; - out << nl << "__v.__read(__is);"; - out << nl << "return __v;"; + out << nl << "v.read(istr);"; + out << nl << "return v;"; out << eb; - out << nl << nl << "private static final " << name << " __nullMarshalValue = new " << name << "();"; + out << nl << nl << "private static final " << name << " _nullMarshalValue = new " << name << "();"; } out << sp << nl << "public static final long serialVersionUID = "; @@ -3735,7 +3819,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) if(optional) { - out << nl << "private boolean __has_" << p->name() << ';'; + out << nl << "private boolean _" << p->name() << ';'; } // @@ -3781,7 +3865,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.lang.IllegalStateException(\"" << name << " is not set\");"; out << eb; @@ -3795,13 +3879,13 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << sp; writeDocComment(out, p, deprecateReason); out << nl << "public void" - << nl << "set" << capName << '(' << s << " _" << name << ')'; + << nl << "set" << capName << '(' << s << " " << name << ')'; out << sb; if(optional) { - out << nl << "__has_" << p->name() << " = true;"; + out << nl << "_" << p->name() << " = true;"; } - out << nl << name << " = _" << name << ';'; + out << nl << "this." << name << " = " << name << ';'; out << eb; // @@ -3814,7 +3898,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << nl << "public boolean" << nl << "has" << capName << "()"; out << sb; - out << nl << "return __has_" << p->name() << ';'; + out << nl << "return _" << p->name() << ';'; out << eb; out << sp; @@ -3822,7 +3906,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << nl << "public void" << nl << "clear" << capName << "()"; out << sb; - out << nl << "__has_" << p->name() << " = false;"; + out << nl << "_" << p->name() << " = false;"; out << eb; const string optType = typeToString(type, TypeModeMember, getPackage(contained), metaData, true, true); @@ -3830,16 +3914,16 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << sp; writeDocComment(out, p, deprecateReason); out << nl << "public void" - << nl << "optional" << capName << '(' << optType << " __v)"; + << nl << "optional" << capName << '(' << optType << " v)"; out << sb; - out << nl << "if(__v == null || !__v.isSet())"; + out << nl << "if(v == null || !v.isSet())"; out << sb; - out << nl << "__has_" << p->name() << " = false;"; + out << nl << "_" << p->name() << " = false;"; out << eb; out << nl << "else"; out << sb; - out << nl << "__has_" << p->name() << " = true;"; - out << nl << name << " = __v.get();"; + out << nl << "_" << p->name() << " = true;"; + out << nl << name << " = v.get();"; out << eb; out << eb; @@ -3848,7 +3932,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << nl << "public " << optType << nl << "optional" << capName << "()"; out << sb; - out << nl << "if(__has_" << p->name() << ')'; + out << nl << "if(_" << p->name() << ')'; out << sb; out << nl << "return new " << optType << '(' << name << ");"; out << eb; @@ -3881,7 +3965,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.lang.IllegalStateException(\"" << name << " is not set\");"; out << eb; @@ -3918,16 +4002,16 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << nl << " **/"; } out << nl << "public " << elem; - out << nl << "get" << capName << "(int _index)"; + out << nl << "get" << capName << "(int index)"; out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.lang.IllegalStateException(\"" << name << " is not set\");"; out << eb; } - out << nl << "return " << name << "[_index];"; + out << nl << "return this." << name << "[index];"; out << eb; // @@ -3941,16 +4025,16 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) out << nl << " **/"; } out << nl << "public void"; - out << nl << "set" << capName << "(int _index, " << elem << " _val)"; + out << nl << "set" << capName << "(int index, " << elem << " val)"; out << sb; if(optional) { - out << nl << "if(!__has_" << p->name() << ')'; + out << nl << "if(!_" << p->name() << ')'; out << sb; out << nl << "throw new java.lang.IllegalStateException(\"" << name << " is not set\");"; out << eb; } - out << nl << name << "[_index] = _val;"; + out << nl << "this." << name << "[index] = val;"; out << eb; } } @@ -3991,16 +4075,14 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p) } out << ';'; - out << sp << nl << "public int" - << nl << "value()"; + out << sp << nl << "public int value()"; out << sb; - out << nl << "return __value;"; + out << nl << "return _value;"; out << eb; - out << sp << nl << "public static " << name - << nl << "valueOf(int __v)"; + out << sp << nl << "public static " << name << " valueOf(int v)"; out << sb; - out << nl << "switch(__v)"; + out << nl << "switch(v)"; out << sb; out.dec(); for(EnumeratorList::const_iterator en = enumerators.begin(); en != enumerators.end(); ++en) @@ -4015,51 +4097,49 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p) out << nl << "return null;"; out << eb; - out << sp << nl << "private" - << nl << name << "(int __v)"; + out << sp << nl << "private " << name << "(int v)"; out << sb; - out << nl << "__value = __v;"; + out << nl << "_value = v;"; out << eb; if(!p->isLocal()) { - out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __os)"; + out << sp << nl << "public void write(Ice.OutputStream ostr)"; out << sb; - out << nl << "__os.writeEnum(value(), " << p->maxValue() << ");"; + out << nl << "ostr.writeEnum(_value, " << p->maxValue() << ");"; out << eb; - out << sp << nl << "public static void" << nl << "write(Ice.OutputStream __os, " << name << " __v)"; + out << sp << nl << "public static void write(Ice.OutputStream ostr, " << name << " v)"; out << sb; - out << nl << "if(__v == null)"; + out << nl << "if(v == null)"; out << sb; string firstEnum = fixKwd(enumerators.front()->name()); - out << nl << "__os.writeEnum(" << absolute << '.' << firstEnum << ".value(), " << p->maxValue() << ");"; + out << nl << "ostr.writeEnum(" << absolute << '.' << firstEnum << ".value(), " << p->maxValue() << ");"; out << eb; out << nl << "else"; out << sb; - out << nl << "__os.writeEnum(__v.value(), " << p->maxValue() << ");"; + out << nl << "ostr.writeEnum(v.value(), " << p->maxValue() << ");"; out << eb; out << eb; - out << sp << nl << "public static " << name << nl << "read(Ice.InputStream __is)"; + out << sp << nl << "public static " << name << " read(Ice.InputStream istr)"; out << sb; - out << nl << "int __v = __is.readEnum(" << p->maxValue() << ");"; - out << nl << "return __validate(__v);"; + out << nl << "int v = istr.readEnum(" << p->maxValue() << ");"; + out << nl << "return validate(v);"; out << eb; - out << sp << nl << "private static " << name - << nl << "__validate(int __v)"; + out << sp << nl << "private static " << name << " validate(int v)"; out << sb; - out << nl << "final " << name << " __e = valueOf(__v);"; - out << nl << "if(__e == null)"; + out << nl << "final " << name << " e = valueOf(v);"; + out << nl << "if(e == null)"; out << sb; - out << nl << "throw new Ice.MarshalException(\"enumerator value \" + __v + \" is out of range\");"; + out << nl << "throw new Ice.MarshalException(\"enumerator value \" + v + \" is out of range\");"; out << eb; - out << nl << "return __e;"; + out << nl << "return e;"; out << eb; } - out << sp << nl << "private final int __value;"; + out << sp << nl << "private final int _value;"; out << eb; close(); @@ -4325,8 +4405,8 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << sb; - string contextParam = "java.util.Map<String, String> __ctx"; - string explicitContextParam = "boolean __explicitCtx"; + string contextParam = "java.util.Map<String, String> context"; + string explicitContextParam = "boolean explicitCtx"; OperationList ops = p->allOperations(); for(OperationList::iterator r = ops.begin(); r != ops.end(); ++r) @@ -4336,7 +4416,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) const ClassDefPtr cl = ClassDefPtr::dynamicCast(container); out << sp; - out << nl << "private static final String __" << op->name() << "_name = \"" << op->name() << "\";"; + out << nl << "private static final String _" << op->name() << "_name = \"" << op->name() << "\";"; // // Use the optional mapping by default. @@ -4364,22 +4444,22 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) const string retS = typeToString(ret, TypeModeReturn, package, op->getMetaData(), true, op->returnIsOptional()); out << sp; - out << nl << "public " << retS << " end_" << op->name() << spar << outParams << "Ice.AsyncResult __iresult" + out << nl << "public " << retS << " end_" << op->name() << spar << outParams << "Ice.AsyncResult iresult" << epar; writeThrowsClause(package, throws); out << sb; if(op->returnsData()) { - out << nl << "IceInternal.OutgoingAsync __result = IceInternal.OutgoingAsync.check(__iresult, this, __" + out << nl << "IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _" << op->name() << "_name);"; out << nl << "try"; out << sb; - out << nl << "if(!__result.__wait())"; + out << nl << "if(!result_.waitForResponseOrUserEx())"; out << sb; out << nl << "try"; out << sb; - out << nl << "__result.throwUserException();"; + out << nl << "result_.throwUserException();"; out << eb; // // Arrange exceptions into most-derived to least-derived order. If we don't @@ -4394,20 +4474,20 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) #endif for(ExceptionList::const_iterator eli = throws.begin(); eli != throws.end(); ++eli) { - out << nl << "catch(" << getAbsolute(*eli, package) << " __ex)"; + out << nl << "catch(" << getAbsolute(*eli, package) << " ex_)"; out << sb; - out << nl << "throw __ex;"; + out << nl << "throw ex_;"; out << eb; } - out << nl << "catch(Ice.UserException __ex)"; + out << nl << "catch(Ice.UserException ex_)"; out << sb; - out << nl << "throw new Ice.UnknownUserException(__ex.ice_id(), __ex);"; + out << nl << "throw new Ice.UnknownUserException(ex_.ice_id(), ex_);"; out << eb; out << eb; if(ret || !outParams.empty()) { - out << nl << "Ice.InputStream __is = __result.startReadParams();"; + out << nl << "Ice.InputStream istr_ = result_.startReadParams();"; const ParamDeclList paramList = op->parameters(); ParamDeclList pl; for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli) @@ -4417,16 +4497,16 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) pl.push_back(*pli); } } - writeMarshalUnmarshalParams(out, package, pl, op, iter, false, true); + writeMarshalUnmarshalParams(out, package, pl, op, iter, false, true, false); if(op->returnsClasses(false)) { - out << nl << "__is.readPendingValues();"; + out << nl << "istr_.readPendingValues();"; } - out << nl << "__result.endReadParams();"; + out << nl << "result_.endReadParams();"; } else { - out << nl << "__result.readEmptyParams();"; + out << nl << "result_.readEmptyParams();"; } if(ret) @@ -4435,32 +4515,32 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) if(!op->returnIsOptional() && ((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret))) { - out << nl << "return __ret.value;"; + out << nl << "return ret_.value;"; } else { - out << nl << "return __ret;"; + out << nl << "return ret_;"; } } out << eb; out << nl << "finally"; out << sb; - out << nl << "if(__result != null)"; + out << nl << "if(result_ != null)"; out << sb; - out << nl << "__result.cacheMessageBuffers();"; + out << nl << "result_.cacheMessageBuffers();"; out << eb; out << eb; } else { - out << nl << "__end(__iresult, __" << op->name() << "_name);"; + out << nl << "_end(iresult, _" << op->name() << "_name);"; } out << eb; // - // The async callbacks implementation of __completed method delegate to the static - // __<op-name>_completed method implemented bellow. + // The async callbacks implementation of _iceCompleted method delegate to the static + // _iceI_<op-name>_completed method implemented bellow. // if(op->returnsData()) { @@ -4474,69 +4554,69 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) } } - out << sp << nl << "static public void __" << op->name() << "_completed(" - << getAsyncCallbackInterface(op, package) << " __cb, Ice.AsyncResult __result)"; + out << sp << nl << "static public void _iceI_" << op->name() << "_completed(" + << getAsyncCallbackInterface(op, package) << " cb, Ice.AsyncResult result)"; out << sb; - out << nl << getAbsolute(cl, "", "", "Prx") << " __proxy = (" - << getAbsolute(cl, "", "", "Prx") << ")__result.getProxy();"; + out << nl << getAbsolute(cl, "", "", "Prx") << " _proxy = (" + << getAbsolute(cl, "", "", "Prx") << ")result.getProxy();"; TypePtr ret = op->returnType(); if(ret) { out << nl << typeToString(ret, TypeModeIn, package, op->getMetaData(), true, op->returnIsOptional()) - << " __ret = " << (op->returnIsOptional() ? "null" : initValue(ret)) << ';'; + << " ret = " << (op->returnIsOptional() ? "null" : initValue(ret)) << ';'; } for(ParamDeclList::const_iterator pli = outParams.begin(); pli != outParams.end(); ++pli) { string ts = typeToString((*pli)->type(), TypeModeOut, package, (*pli)->getMetaData(), true, (*pli)->optional()); - out << nl << ts << ' ' << fixKwd((*pli)->name()) << " = new " << ts << "();"; + out << nl << ts << " iceP_" << (*pli)->name() << " = new " << ts << "();"; } out << nl << "try"; out << sb; out << nl; if(op->returnType()) { - out << "__ret = "; + out << "ret = "; } - out << "__proxy.end_" << op->name() << spar << getInOutArgs(op, OutParam) << "__result" << epar + out << "_proxy.end_" << op->name() << spar << getInOutArgs(op, OutParam, true) << "result" << epar << ';'; out << eb; if(!throws.empty()) { - out << nl << "catch(Ice.UserException __ex)"; + out << nl << "catch(Ice.UserException ex)"; out << sb; - out << nl << "__cb.exception(__ex);"; + out << nl << "cb.exception(ex);"; out << nl << "return;"; out << eb; } - out << nl << "catch(Ice.LocalException __ex)"; + out << nl << "catch(Ice.LocalException ex)"; out << sb; - out << nl << "__cb.exception(__ex);"; + out << nl << "cb.exception(ex);"; out << nl << "return;"; out << eb; - out << nl << "catch(Ice.SystemException __ex)"; + out << nl << "catch(Ice.SystemException ex)"; out << sb; - out << nl << "__cb.exception(__ex);"; + out << nl << "cb.exception(ex);"; out << nl << "return;"; out << eb; - out << nl << "__cb.response" << spar; + out << nl << "cb.response" << spar; if(op->returnType()) { - out << "__ret"; + out << "ret"; } for(ParamDeclList::const_iterator pli = outParams.begin(); pli != outParams.end(); ++pli) { if((*pli)->optional()) { - out << fixKwd((*pli)->name()); + out << "iceP_" + (*pli)->name(); } else { - out << fixKwd((*pli)->name()) + ".value"; + out << "iceP_" + (*pli)->name() + ".value"; } } out << epar << ';'; @@ -4549,11 +4629,11 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) writeDocComment(out, "", "Contacts the remote server to verify that the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" + "@param obj The untyped proxy.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx __obj)"; + out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx obj)"; out << sb; - out << nl << "return checkedCastImpl(__obj, ice_staticId(), " << name << "Prx.class, " + out << nl << "return checkedCastImpl(obj, ice_staticId(), " << name << "Prx.class, " << name << "PrxHelper.class);"; out << eb; @@ -4561,12 +4641,12 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) writeDocComment(out, "", "Contacts the remote server to verify that the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" - "@param __ctx The Context map to send with the invocation.\n" + "@param obj The untyped proxy.\n" + "@param context The Context map to send with the invocation.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx __obj, " << contextParam << ')'; + out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx obj, " << contextParam << ')'; out << sb; - out << nl << "return checkedCastImpl(__obj, __ctx, ice_staticId(), " << name + out << nl << "return checkedCastImpl(obj, context, ice_staticId(), " << name << "Prx.class, " << name << "PrxHelper.class);"; out << eb; @@ -4574,12 +4654,12 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) writeDocComment(out, "", "Contacts the remote server to verify that a facet of the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" - "@param __facet The name of the desired facet.\n" + "@param obj The untyped proxy.\n" + "@param facet The name of the desired facet.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx __obj, String __facet)"; + out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx obj, String facet)"; out << sb; - out << nl << "return checkedCastImpl(__obj, __facet, ice_staticId(), " << name + out << nl << "return checkedCastImpl(obj, facet, ice_staticId(), " << name << "Prx.class, " << name << "PrxHelper.class);"; out << eb; @@ -4587,37 +4667,37 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) writeDocComment(out, "", "Contacts the remote server to verify that a facet of the object implements this type.\n" "Raises a local exception if a communication error occurs.\n" - "@param __obj The untyped proxy.\n" - "@param __facet The name of the desired facet.\n" - "@param __ctx The Context map to send with the invocation.\n" + "@param obj The untyped proxy.\n" + "@param facet The name of the desired facet.\n" + "@param context The Context map to send with the invocation.\n" "@return A proxy for this type, or null if the object does not support this type."); - out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx __obj, String __facet, " + out << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx obj, String facet, " << contextParam << ')'; out << sb; - out << nl << "return checkedCastImpl(__obj, __facet, __ctx, ice_staticId(), " << name + out << nl << "return checkedCastImpl(obj, facet, context, ice_staticId(), " << name << "Prx.class, " << name << "PrxHelper.class);"; out << eb; out << sp; writeDocComment(out, "", "Downcasts the given proxy to this type without contacting the remote server.\n" - "@param __obj The untyped proxy.\n" + "@param obj The untyped proxy.\n" "@return A proxy for this type."); - out << nl << "public static " << name << "Prx uncheckedCast(Ice.ObjectPrx __obj)"; + out << nl << "public static " << name << "Prx uncheckedCast(Ice.ObjectPrx obj)"; out << sb; - out << nl << "return uncheckedCastImpl(__obj, " << name << "Prx.class, " << name + out << nl << "return uncheckedCastImpl(obj, " << name << "Prx.class, " << name << "PrxHelper.class);"; out << eb; out << sp; writeDocComment(out, "", "Downcasts the given proxy to this type without contacting the remote server.\n" - "@param __obj The untyped proxy.\n" - "@param __facet The name of the desired facet.\n" + "@param obj The untyped proxy.\n" + "@param facet The name of the desired facet.\n" "@return A proxy for this type."); - out << nl << "public static " << name << "Prx uncheckedCast(Ice.ObjectPrx __obj, String __facet)"; + out << nl << "public static " << name << "Prx uncheckedCast(Ice.ObjectPrx obj, String facet)"; out << sb; - out << nl << "return uncheckedCastImpl(__obj, __facet, " << name << "Prx.class, " << name + out << nl << "return uncheckedCastImpl(obj, facet, " << name << "Prx.class, " << name << "PrxHelper.class);"; out << eb; @@ -4635,7 +4715,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) assert(scopedIter != ids.end()); StringList::difference_type scopedPos = ::IceUtilInternal::distance(firstIter, scopedIter); - out << sp << nl << "public static final String[] __ids ="; + out << sp << nl << "private static final String[] _ids ="; out << sb; for(StringList::const_iterator q = ids.begin(); q != ids.end();) @@ -4655,21 +4735,21 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) "@return The Slice type ID."); out << nl << "public static String ice_staticId()"; out << sb; - out << nl << "return __ids[" << scopedPos << "];"; + out << nl << "return _ids[" << scopedPos << "];"; out << eb; - out << sp << nl << "public static void write(Ice.OutputStream __os, " << name << "Prx v)"; + out << sp << nl << "public static void write(Ice.OutputStream ostr, " << name << "Prx v)"; out << sb; - out << nl << "__os.writeProxy(v);"; + out << nl << "ostr.writeProxy(v);"; out << eb; - out << sp << nl << "public static " << name << "Prx read(Ice.InputStream __is)"; + out << sp << nl << "public static " << name << "Prx read(Ice.InputStream istr)"; out << sb; - out << nl << "Ice.ObjectPrx proxy = __is.readProxy();"; + out << nl << "Ice.ObjectPrx proxy = istr.readProxy();"; out << nl << "if(proxy != null)"; out << sb; out << nl << name << "PrxHelper result = new " << name << "PrxHelper();"; - out << nl << "result.__copyFrom(proxy);"; + out << nl << "result._copyFrom(proxy);"; out << nl << "return result;"; out << eb; out << nl << "return null;"; @@ -4776,10 +4856,10 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p) out << sp << nl << "public final class " << name << "Helper"; out << sb; - out << nl << "public static void" << nl << "write(Ice.OutputStream __os, " << typeS << " __v)"; + out << nl << "public static void" << nl << "write(Ice.OutputStream ostr, " << typeS << " v)"; out << sb; iter = 0; - writeSequenceMarshalUnmarshalCode(out, package, p, "__v", true, iter, false); + writeSequenceMarshalUnmarshalCode(out, package, p, "v", true, iter, false); out << eb; out << sp; @@ -4787,12 +4867,12 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p) { out << nl << "@SuppressWarnings(\"unchecked\")"; } - out << nl << "public static " << typeS << nl << "read(Ice.InputStream __is)"; + out << nl << "public static " << typeS << nl << "read(Ice.InputStream istr)"; out << sb; - out << nl << typeS << " __v;"; + out << nl << typeS << " v;"; iter = 0; - writeSequenceMarshalUnmarshalCode(out, package, p, "__v", false, iter, false); - out << nl << "return __v;"; + writeSequenceMarshalUnmarshalCode(out, package, p, "v", false, iter, false); + out << nl << "return v;"; out << eb; out << eb; @@ -4828,19 +4908,19 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p) out << sp << nl << "public final class " << name << "Helper"; out << sb; - out << nl << "public static void" << nl << "write(Ice.OutputStream __os, " << formalType << " __v)"; + out << nl << "public static void" << nl << "write(Ice.OutputStream ostr, " << formalType << " v)"; out << sb; iter = 0; - writeDictionaryMarshalUnmarshalCode(out, package, p, "__v", true, iter, false); + writeDictionaryMarshalUnmarshalCode(out, package, p, "v", true, iter, false); out << eb; out << sp << nl << "public static " << formalType - << nl << "read(Ice.InputStream __is)"; + << nl << "read(Ice.InputStream istr)"; out << sb; - out << nl << formalType << " __v;"; + out << nl << formalType << " v;"; iter = 0; - writeDictionaryMarshalUnmarshalCode(out, package, p, "__v", false, iter, false); - out << nl << "return __v;"; + writeDictionaryMarshalUnmarshalCode(out, package, p, "v", false, iter, false); + out << nl << "return v;"; out << eb; out << eb; @@ -4849,13 +4929,15 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p) void Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const string& package, const OperationPtr& op, - bool optionalMapping) + bool optionalMapping) { const string name = p->name(); Output& out = output(); - const string contextParam = "java.util.Map<String, String> __ctx"; - const string explicitContextParam = "boolean __explicitCtx"; + const string contextParamName = getEscapedParamName(op, "context"); + const string contextParam = "java.util.Map<String, String> " + contextParamName; + const string contextParamInternal = "java.util.Map<String, String> context"; + const string explicitContextParam = "boolean explicitCtx"; const ContainerPtr container = op->container(); const ClassDefPtr cl = ClassDefPtr::dynamicCast(container); @@ -4864,6 +4946,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri const string retS = typeToString(ret, TypeModeReturn, package, op->getMetaData(), true, op->returnIsOptional()); vector<string> params = getParamsProxy(op, package, false, optionalMapping); + vector<string> paramsInternal = getParamsProxy(op, package, false, optionalMapping, true); vector<string> args = getArgs(op); ParamDeclList inParams; @@ -4897,7 +4980,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri { out << "return "; } - out << opName << spar << args << "null" << "false" << epar << ';'; + out << "_iceI_" << op->name() << spar << args << "null" << "false" << epar << ';'; out << eb; out << sp << nl << "public " << retS << ' ' << opName << spar << params << contextParam << epar; @@ -4908,11 +4991,11 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri { out << "return "; } - out << opName << spar << args << "__ctx" << "true" << epar << ';'; + out << "_iceI_" << op->name() << spar << args << contextParamName << "true" << epar << ';'; out << eb; out << sp; - out << nl << "private " << retS << ' ' << opName << spar << params << contextParam + out << nl << "private " << retS << " _iceI_" << op->name() << spar << paramsInternal << contextParamInternal << explicitContextParam << epar; writeThrowsClause(package, throws); out << sb; @@ -4920,7 +5003,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri // This code replaces the synchronous calls with chained AMI calls. if(op->returnsData()) { - out << nl << "__checkTwowayOnly(__" << op->name() << "_name);"; + out << nl << "_checkTwowayOnly(_" << op->name() << "_name);"; } if(ret) @@ -4933,21 +5016,21 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri } out << "end_" << op->name() << "("; - vector<string> inOutArgs = getInOutArgs(op, OutParam); + vector<string> inOutArgs = getInOutArgs(op, OutParam, true); if(!inOutArgs.empty()) { for(vector<string>::const_iterator p = inOutArgs.begin(); p != inOutArgs.end(); ++p) { out << *p << ", "; } } - vector<string> inArgs = getInOutArgs(op, InParam); - out << "begin_" << op->name() << "("; + vector<string> inArgs = getInOutArgs(op, InParam, true); + out << "_iceI_begin_" << op->name() << "("; if(!inArgs.empty()) { for(vector<string>::const_iterator p = inArgs.begin(); p != inArgs.end(); ++p) { out << *p << ", "; } } - out << "__ctx, __explicitCtx, true, null));"; + out << "context, explicitCtx, true, null));"; out << eb; { @@ -4956,7 +5039,8 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri // vector<string> inParams = getInOutParams(op, package, InParam, true, optionalMapping); vector<string> inArgs = getInOutArgs(op, InParam); - const string callbackParam = "Ice.Callback __cb"; + const string callbackParamName = getEscapedParamName(op, "cb"); + const string callbackParam = "Ice.Callback " + callbackParamName; const ParamDeclList paramList = op->parameters(); int iter; @@ -4965,26 +5049,26 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri // out << sp << nl << "public Ice.AsyncResult begin_" << op->name() << spar << inParams << epar; out << sb; - out << nl << "return begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << "null" << epar + out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << "null" << epar << ';'; out << eb; out << sp << nl << "public Ice.AsyncResult begin_" << op->name() << spar << inParams << contextParam << epar; out << sb; - out << nl << "return begin_" << op->name() << spar << inArgs << "__ctx" << "true" << "false" << "null" << epar + out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false" << "null" << epar << ';'; out << eb; out << sp << nl << "public Ice.AsyncResult begin_" << op->name() << spar << inParams << callbackParam << epar; out << sb; - out << nl << "return begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << "__cb" << epar + out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << callbackParamName << epar << ';'; out << eb; out << sp << nl << "public Ice.AsyncResult begin_" << op->name() << spar << inParams << contextParam << callbackParam << epar; out << sb; - out << nl << "return begin_" << op->name() << spar << inArgs << "__ctx" << "true" << "false" << "__cb" << epar + out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false" << callbackParamName << epar << ';'; out << eb; @@ -5000,19 +5084,19 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri ContainerPtr container = op->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); string opClassName = getAbsolute(cl, package, "Callback_", '_' + op->name()); - typeSafeCallbackParam = opClassName + " __cb"; + typeSafeCallbackParam = opClassName + " " + getEscapedParamName(op, "cb"); out << sp << nl << "public Ice.AsyncResult begin_" << op->name() << spar << inParams << typeSafeCallbackParam << epar; out << sb; - out << nl << "return begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << "__cb" << epar + out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << callbackParamName << epar << ';'; out << eb; out << sp << nl << "public Ice.AsyncResult begin_" << op->name() << spar << inParams << contextParam << typeSafeCallbackParam << epar; out << sb; - out << nl << "return begin_" << op->name() << spar << inArgs << "__ctx" << "true" << "false" << "__cb" << epar + out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false" << callbackParamName << epar << ';'; out << eb; @@ -5023,14 +5107,14 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri out << nl << "public Ice.AsyncResult begin_" << op->name(); writeParamList(out, getParamsAsyncLambda(op, package, false, false, optionalMapping)); out << sb; - out << nl << "return begin_" << op->name() << spar << getArgsAsyncLambda(op, package) << epar << ';'; + out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package) << epar << ';'; out << eb; out << sp; out << nl << "public Ice.AsyncResult begin_" << op->name(); writeParamList(out, getParamsAsyncLambda(op, package, false, true, optionalMapping)); out << sb; - out << nl << "return begin_" << op->name() << spar << getArgsAsyncLambda(op, package, false, true) << epar + out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, false, true) << epar << ';'; out << eb; @@ -5038,26 +5122,26 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri out << nl << "public Ice.AsyncResult begin_" << op->name(); writeParamList(out, getParamsAsyncLambda(op, package, true, false, optionalMapping)); out << sb; - out << nl << "return begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true) << epar << ';'; + out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true) << epar << ';'; out << eb; out << sp; out << nl << "public Ice.AsyncResult begin_" << op->name(); writeParamList(out, getParamsAsyncLambda(op, package, true, true, optionalMapping)); out << sb; - out << nl << "return begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true, true) << epar + out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true, true) << epar << ';'; out << eb; - vector<string> params = inParams; - params.push_back(contextParam); - params.push_back("boolean __explicitCtx"); - params.push_back("boolean __synchronous"); - vector<string> asyncParams = getParamsAsyncLambda(op, package, false, true, optionalMapping, false); + vector<string> params = getInOutParams(op, package, InParam, true, optionalMapping, true); + params.push_back("java.util.Map<String, String> context"); + params.push_back("boolean explicitCtx"); + params.push_back("boolean synchronous"); + vector<string> asyncParams = getParamsAsyncLambda(op, package, false, true, optionalMapping, false, true); copy(asyncParams.begin(), asyncParams.end(), back_inserter(params)); out << sp; - out << nl << "private Ice.AsyncResult begin_" << op->name(); + out << nl << "private Ice.AsyncResult _iceI_begin_" << op->name(); writeParamList(out, params); out << sb; @@ -5065,12 +5149,12 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri if(!op->returnsData()) { - params = getInOutArgs(op, InParam); - params.push_back("__ctx"); - params.push_back("__explicitCtx"); - params.push_back("__synchronous"); - params.push_back("new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, __sentCb)"); - out << nl << "return begin_" << op->name(); + params = getInOutArgs(op, InParam, true); + params.push_back("context"); + params.push_back("explicitCtx"); + params.push_back("synchronous"); + params.push_back("new IceInternal.Functional_OnewayCallback(responseCb, exceptionCb, sentCb)"); + out << nl << "return _iceI_begin_" << op->name(); writeParamList(out, params); out << ';'; } @@ -5097,57 +5181,57 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri out << "userExceptionCb, "; } out << "exceptionCb, sentCb);"; - out << nl << "__responseCb = responseCb;"; + out << nl << "_responseCb = responseCb;"; out << eb; out << sp; out << nl << "public void response" << spar << getParamsAsyncCB(op, package, false, true) << epar; out << sb; - out << nl << "if(__responseCb != null)"; + out << nl << "if(_responseCb != null)"; out << sb; - out << nl << "__responseCb.apply" << spar; + out << nl << "_responseCb.apply" << spar; if(ret) { - out << "__ret"; + out << "ret"; } out << getInOutArgs(op, OutParam) << epar << ';'; out << eb; out << eb; out << sp; - out << nl << "public final void __completed(Ice.AsyncResult __result)"; + out << nl << "public final void _iceCompleted(Ice.AsyncResult result)"; out << sb; - out << nl << p->name() << "PrxHelper.__" << op->name() << "_completed(this, __result);"; + out << nl << p->name() << "PrxHelper._iceI_" << op->name() << "_completed(this, result);"; out << eb; out << sp; - out << nl << "private final " << getLambdaResponseCB(op, package) << " __responseCb;"; + out << nl << "private final " << getLambdaResponseCB(op, package) << " _responseCb;"; out << eb; - out << nl << "return begin_" << op->name() << spar << getInOutArgs(op, InParam) << "__ctx" - << "__explicitCtx" - << "__synchronous" - << (throws.empty() ? "new CB(__responseCb, __exceptionCb, __sentCb)" : - "new CB(__responseCb, __userExceptionCb, __exceptionCb, __sentCb)") + out << nl << "return _iceI_begin_" << op->name() << spar << getInOutArgs(op, InParam, true) << "context" + << "explicitCtx" + << "synchronous" + << (throws.empty() ? "new CB(responseCb, exceptionCb, sentCb)" : + "new CB(responseCb, userExceptionCb, exceptionCb, sentCb)") << epar << ';'; } else { - params = getInOutArgs(op, InParam); - params.push_back("__ctx"); - params.push_back("__explicitCtx"); - params.push_back("__synchronous"); + params = getInOutArgs(op, InParam, true); + params.push_back("context"); + params.push_back("explicitCtx"); + params.push_back("synchronous"); const string baseClass = getAsyncCallbackBaseClass(op, true); - out << nl << "return begin_" << op->name(); + out << nl << "return _iceI_begin_" << op->name(); writeParamList(out, params, false, false); out << nl - << (throws.empty() ? "new " + baseClass + "(__responseCb, __exceptionCb, __sentCb)" : - "new " + baseClass + "(__responseCb, __userExceptionCb, __exceptionCb, __sentCb)"); + << (throws.empty() ? "new " + baseClass + "(responseCb, exceptionCb, sentCb)" : + "new " + baseClass + "(responseCb, userExceptionCb, exceptionCb, sentCb)"); out.inc(); out << sb; - out << nl << "public final void __completed(Ice.AsyncResult __result)"; + out << nl << "public final void _iceCompleted(Ice.AsyncResult result)"; out << sb; - out << nl << p->name() << "PrxHelper.__" << op->name() << "_completed(this, __result);"; + out << nl << p->name() << "PrxHelper._iceI_" << op->name() << "_completed(this, result);"; out << eb; out << eb; out << ");"; @@ -5157,34 +5241,34 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri out << eb; // - // Implementation of begin method + // Implementation of _iceI_begin method // - params = inParams; - params.push_back(contextParam); - params.push_back("boolean __explicitCtx"); - params.push_back("boolean __synchronous"); - params.push_back("IceInternal.CallbackBase __cb"); + params = getInOutParams(op, package, InParam, true, optionalMapping, true); + params.push_back("java.util.Map<String, String> context"); + params.push_back("boolean explicitCtx"); + params.push_back("boolean synchronous"); + params.push_back("IceInternal.CallbackBase cb"); out << sp; - out << nl << "private Ice.AsyncResult begin_" << op->name(); + out << nl << "private Ice.AsyncResult _iceI_begin_" << op->name(); writeParamList(out, params); out << sb; if(op->returnsData()) { - out << nl << "__checkAsyncTwowayOnly(__" << op->name() << "_name);"; + out << nl << "_checkAsyncTwowayOnly(_" << op->name() << "_name);"; } - out << nl << "IceInternal.OutgoingAsync __result = getOutgoingAsync(__" << op->name() - << "_name, __cb);"; + out << nl << "IceInternal.OutgoingAsync result = getOutgoingAsync(_" << op->name() + << "_name, cb);"; out << nl << "try"; out << sb; - out << nl << "__result.prepare(__" << op->name() << "_name, " << sliceModeToIceMode(op->sendMode()) - << ", __ctx, __explicitCtx, __synchronous);"; + out << nl << "result.prepare(_" << op->name() << "_name, " << sliceModeToIceMode(op->sendMode()) + << ", context, explicitCtx, synchronous);"; iter = 0; if(!inArgs.empty()) { - out << nl << "Ice.OutputStream __os = __result.startWriteParams(" << opFormatTypeToString(op) << ");"; + out << nl << "Ice.OutputStream ostr = result.startWriteParams(" << opFormatTypeToString(op) << ");"; ParamDeclList pl; for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli) { @@ -5193,25 +5277,25 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri pl.push_back(*pli); } } - writeMarshalUnmarshalParams(out, package, pl, 0, iter, true, optionalMapping); + writeMarshalUnmarshalParams(out, package, pl, 0, iter, true, optionalMapping, true); if(op->sendsClasses(false)) { - out << nl << "__os.writePendingValues();"; + out << nl << "ostr.writePendingValues();"; } - out << nl << "__result.endWriteParams();"; + out << nl << "result.endWriteParams();"; } else { - out << nl << "__result.writeEmptyParams();"; + out << nl << "result.writeEmptyParams();"; } - out << nl << "__result.invoke();"; + out << nl << "result.invoke();"; out << eb; - out << nl << "catch(Ice.Exception __ex)"; + out << nl << "catch(Ice.Exception ex)"; out << sb; - out << nl << "__result.abort(__ex);"; + out << nl << "result.abort(ex);"; out << eb; - out << nl << "return __result;"; + out << nl << "return result;"; out << eb; } } @@ -5293,12 +5377,13 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p) throws.unique(); string deprecateReason = getDeprecateReason(p, cl, "operation"); - string contextDoc = "@param __ctx The Context map to send with the invocation."; - string contextParam = "java.util.Map<String, String> __ctx"; - string lambdaResponseDoc = "@param __responseCb The lambda response callback."; - string lambdaUserExDoc = "@param __userExceptionCb The lambda user exception callback."; - string lambdaExDoc = "@param __exceptionCb The lambda exception callback."; - string lambdaSentDoc = "@param __sentCb The lambda sent callback."; + string contextDoc = "@param context The Context map to send with the invocation."; + string contextParamName = getEscapedParamName(p, "context"); + string contextParam = "java.util.Map<String, String> " + contextParamName; + string lambdaResponseDoc = "@param responseCb The lambda response callback."; + string lambdaUserExDoc = "@param userExceptionCb The lambda user exception callback."; + string lambdaExDoc = "@param exceptionCb The lambda exception callback."; + string lambdaSentDoc = "@param sentCb The lambda sent callback."; const bool optional = p->sendsOptionals(); @@ -5346,8 +5431,8 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p) // Start with the type-unsafe begin methods. // vector<string> inParams = getInOutParams(p, package, InParam, true, true); - string callbackParam = "Ice.Callback __cb"; - string callbackDoc = "@param __cb The asynchronous callback object."; + string callbackParam = "Ice.Callback " + getEscapedParamName(p, "cb"); + string callbackDoc = "@param cb The asynchronous callback object."; out << sp; writeDocCommentAMI(out, p, InParam); @@ -5378,7 +5463,7 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p) ContainerPtr container = p->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); string opClassName = getAbsolute(cl, package, "Callback_", '_' + p->name()); - typeSafeCallbackParam = opClassName + " __cb"; + typeSafeCallbackParam = opClassName + " " + getEscapedParamName(p, "cb"); out << sp; writeDocCommentAMI(out, p, InParam, callbackDoc); @@ -5444,7 +5529,7 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p) out << sp; writeDocCommentAMI(out, p, OutParam); - out << nl << "public " << retS << " end_" << p->name() << spar << outParams << "Ice.AsyncResult __result" + out << nl << "public " << retS << " end_" << p->name() << spar << outParams << "Ice.AsyncResult result" << epar; writeThrowsClause(package, throws); out << ';'; @@ -5456,8 +5541,8 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p) // Write overloaded versions of the methods using required params. // vector<string> inParams = getInOutParams(p, package, InParam, true, false); - string callbackParam = "Ice.Callback __cb"; - string callbackDoc = "@param __cb The asynchronous callback object."; + string callbackParam = "Ice.Callback " + getEscapedParamName(p, "cb"); + string callbackDoc = "@param cb The asynchronous callback object."; out << sp; writeDocCommentAMI(out, p, InParam); @@ -5520,7 +5605,7 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p) ContainerPtr container = p->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); string opClassName = getAbsolute(cl, package, "Callback_", '_' + p->name()); - typeSafeCallbackParam = opClassName + " __cb"; + typeSafeCallbackParam = opClassName + " " + getEscapedParamName(p, "cb"); out << sp; writeDocCommentAMI(out, p, InParam, callbackDoc); @@ -5559,14 +5644,6 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "public abstract class _" << name << "Disp extends Ice.ObjectImpl implements " << fixKwd(name); out << sb; - out << sp << nl << "protected void" << nl << "ice_copyStateFrom(Ice.Object __obj)"; - out.inc(); - out << nl << "throws java.lang.CloneNotSupportedException"; - out.dec(); - out << sb; - out << nl << "throw new java.lang.CloneNotSupportedException();"; - out << eb; - writeDispatchAndMarshalling(out, p); // @@ -5707,9 +5784,12 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "@SuppressWarnings(\"deprecation\")"; } out << nl << "public " << (hasAMD ? string("void") : retS) << ' ' << opName << spar << params; + + const string currentParamName = getEscapedParamName((*r), "current"); + if(!p->isLocal()) { - out << "Ice.Current __current"; + out << "Ice.Current " + currentParamName; } out << epar; @@ -5735,7 +5815,7 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) out << "_ice_delegate." << opName << spar << args; if(!p->isLocal()) { - out << "__current"; + out << currentParamName; } out << epar << ';'; out << eb; @@ -5952,7 +6032,8 @@ Slice::GenCompat::BaseImplVisitor::writeOperation(Output& out, const string& pac { vector<string> paramsAMD = getParamsAsync(op, package, true, true); - out << sp << nl << "public void " << opName << "_async" << spar << paramsAMD << "Ice.Current __current" + out << sp << nl << "public void " << opName << "_async" << spar << paramsAMD + << "Ice.Current " + getEscapedParamName(op, "current") << epar; ExceptionList throws = op->throws(); @@ -5974,7 +6055,7 @@ Slice::GenCompat::BaseImplVisitor::writeOperation(Output& out, const string& pac out << sb; - string result = "__r"; + string result = "r"; ParamDeclList paramList = op->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) { @@ -5997,7 +6078,7 @@ Slice::GenCompat::BaseImplVisitor::writeOperation(Output& out, const string& pac } } - out << nl << "__cb.ice_response("; + out << nl << "cb.ice_response("; if(ret) { out << result; @@ -6022,9 +6103,10 @@ Slice::GenCompat::BaseImplVisitor::writeOperation(Output& out, const string& pac else { out << sp << nl << "public " << retS << nl << fixKwd(opName) << spar << params; + if(!local) { - out << "Ice.Current __current"; + out << "Ice.Current " + getEscapedParamName(op, "current"); } out << epar; @@ -6278,9 +6360,9 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p) out.dec(); out << sb; - out << sp << nl << "public final void __completed(Ice.AsyncResult __result)"; + out << sp << nl << "public final void _iceCompleted(Ice.AsyncResult result)"; out << sb; - out << nl << cl->name() << "PrxHelper.__" << p->name() << "_completed(this, __result);"; + out << nl << cl->name() << "PrxHelper._iceI_" << p->name() << "_completed(this, result);"; out << eb; out << eb; @@ -6357,11 +6439,11 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p) iter = 0; if(ret || !outParams.empty()) { - out << nl << "Ice.OutputStream __os = this.startWriteParams();"; - writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false); + out << nl << "Ice.OutputStream ostr_ = this.startWriteParams();"; + writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false, "ret", false); if(p->returnsClasses(false)) { - out << nl << "__os.writePendingValues();"; + out << nl << "ostr_.writePendingValues();"; } out << nl << "this.endWriteParams();"; } diff --git a/cpp/src/slice2java/GenCompat.h b/cpp/src/slice2java/GenCompat.h index a55841a43c9..dde47bc772a 100644 --- a/cpp/src/slice2java/GenCompat.h +++ b/cpp/src/slice2java/GenCompat.h @@ -35,8 +35,8 @@ protected: // Compose the parameter lists for an operation. // std::vector<std::string> getParams(const OperationPtr&, const std::string&, bool, bool); - std::vector<std::string> getParamsProxy(const OperationPtr&, const std::string&, bool, bool); - std::vector<std::string> getInOutParams(const OperationPtr&, const std::string&, ParamDir, bool, bool); + std::vector<std::string> getParamsProxy(const OperationPtr&, const std::string&, bool, bool, bool = false); + std::vector<std::string> getInOutParams(const OperationPtr&, const std::string&, ParamDir, bool, bool, bool = false); std::vector<std::string> getParamsAsync(const OperationPtr&, const std::string&, bool, bool); std::vector<std::string> getParamsAsyncCB(const OperationPtr&, const std::string&, bool, bool); @@ -46,20 +46,22 @@ protected: std::vector<std::string> getParamsAsyncLambda(const OperationPtr&, const std::string&, bool context = false, bool sentCB = false, bool optionalMapping = false, - bool inParams = true); + bool inParams = true, + bool internal = false); std::vector<std::string> getArgsAsyncLambda(const OperationPtr&, const std::string&, - bool context = false, bool sentCB = false); + bool context = false, + bool sentCB = false); // // Compose the argument lists for an operation. // std::vector<std::string> getArgs(const OperationPtr&); - std::vector<std::string> getInOutArgs(const OperationPtr&, ParamDir); + std::vector<std::string> getInOutArgs(const OperationPtr&, ParamDir, bool = false); std::vector<std::string> getArgsAsync(const OperationPtr&); std::vector<std::string> getArgsAsyncCB(const OperationPtr&); void writeMarshalUnmarshalParams(::IceUtilInternal::Output&, const std::string&, const ParamDeclList&, - const OperationPtr&, int&, bool, bool, bool = false); + const OperationPtr&, int&, bool, bool, bool, const std::string& = "", bool = false); // // Generate a throws clause containing only non-local exceptions. @@ -75,9 +77,9 @@ protected: // // Marshal/unmarshal a data member. // - void writeMarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&); + void writeMarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&, bool = false); void writeUnmarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&, - bool, int&); + bool, int&, bool = false); void writeStreamMarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&); void writeStreamUnmarshalDataMember(::IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, int&, bool, int&); diff --git a/java-compat/src/Ice/src/main/java/Ice/Blobject.java b/java-compat/src/Ice/src/main/java/Ice/Blobject.java index f1521d0ab6f..85056b318a5 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Blobject.java +++ b/java-compat/src/Ice/src/main/java/Ice/Blobject.java @@ -38,7 +38,7 @@ public abstract class Blobject extends Ice.ObjectImpl @Override public boolean - __dispatch(IceInternal.Incoming in, Current current) + _iceDispatch(IceInternal.Incoming in, Current current) throws UserException { byte[] inEncaps; diff --git a/java-compat/src/Ice/src/main/java/Ice/BlobjectAsync.java b/java-compat/src/Ice/src/main/java/Ice/BlobjectAsync.java index 44b07542a65..0fd86644a44 100644 --- a/java-compat/src/Ice/src/main/java/Ice/BlobjectAsync.java +++ b/java-compat/src/Ice/src/main/java/Ice/BlobjectAsync.java @@ -37,7 +37,7 @@ public abstract class BlobjectAsync extends Ice.ObjectImpl @Override public boolean - __dispatch(IceInternal.Incoming in, Current current) + _iceDispatch(IceInternal.Incoming in, Current current) throws UserException { byte[] inEncaps = in.readParamEncaps(); diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback.java b/java-compat/src/Ice/src/main/java/Ice/Callback.java index 0d852d6d4c6..e428460b7cd 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback.java @@ -38,19 +38,19 @@ public abstract class Callback extends IceInternal.CallbackBase } @Override - public final void __completed(AsyncResult r) + public final void _iceCompleted(AsyncResult r) { completed(r); } @Override - public final void __sent(AsyncResult r) + public final void _iceSent(AsyncResult r) { sent(r); } @Override - public final boolean __hasSentCallback() + public final boolean _iceHasSentCallback() { return true; } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Communicator_flushBatchRequests.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Communicator_flushBatchRequests.java index 7a71fb8a8cc..5b7901bab3e 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Communicator_flushBatchRequests.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Communicator_flushBatchRequests.java @@ -31,26 +31,26 @@ public abstract class Callback_Communicator_flushBatchRequests extends IceIntern } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { try { - __result.getCommunicator().end_flushBatchRequests(__result); + result.getCommunicator().end_flushBatchRequests(result); } - catch(LocalException __ex) + catch(LocalException ex) { - exception(__ex); + exception(ex); } } @Override - public final void __sent(AsyncResult __result) + public final void _iceSent(AsyncResult result) { - sent(__result.sentSynchronously()); + sent(result.sentSynchronously()); } @Override - public final boolean __hasSentCallback() + public final boolean _iceHasSentCallback() { return true; } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Connection_flushBatchRequests.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Connection_flushBatchRequests.java index 3c24bca2512..a02c10edf56 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Connection_flushBatchRequests.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Connection_flushBatchRequests.java @@ -31,26 +31,26 @@ public abstract class Callback_Connection_flushBatchRequests extends IceInternal } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { try { - __result.getConnection().end_flushBatchRequests(__result); + result.getConnection().end_flushBatchRequests(result); } - catch(LocalException __ex) + catch(LocalException ex) { - exception(__ex); + exception(ex); } } @Override - public final void __sent(AsyncResult __result) + public final void _iceSent(AsyncResult result) { - sent(__result.sentSynchronously()); + sent(result.sentSynchronously()); } @Override - public final boolean __hasSentCallback() + public final boolean _iceHasSentCallback() { return true; } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_getConnection.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_getConnection.java index f65533fdaf1..c8d57275c94 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_getConnection.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_getConnection.java @@ -18,14 +18,14 @@ public abstract class Callback_Object_ice_getConnection extends IceInternal.Twow /** * Called when the invocation completes successfully. * - * @param __ret The connection being used by the proxy. + * @param ret The connection being used by the proxy. **/ @Override - public abstract void response(Ice.Connection __ret); + public abstract void response(Ice.Connection ret); @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_getConnection_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_getConnection_completed(this, result); } } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_id.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_id.java index 541989f45da..75b4e4a09d9 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_id.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_id.java @@ -18,14 +18,14 @@ public abstract class Callback_Object_ice_id extends IceInternal.TwowayCallback /** * Called when the invocation completes successfully. * - * @param __ret The Slice type id of the most-derived interface supported by the target object. + * @param ret The Slice type id of the most-derived interface supported by the target object. **/ @Override - public abstract void response(String __ret); + public abstract void response(String ret); @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_id_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_id_completed(this, result); } } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_ids.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_ids.java index ab2ecbd5a95..a71d690a6ef 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_ids.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_ids.java @@ -18,14 +18,14 @@ public abstract class Callback_Object_ice_ids extends IceInternal.TwowayCallback /** * Called when the invocation completes successfully. * - * @param __ret The Slice type ids of the interfaces supported by the target object. + * @param ret The Slice type ids of the interfaces supported by the target object. **/ @Override - public abstract void response(String[] __ret); + public abstract void response(String[] ret); @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_ids_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_ids_completed(this, result); } } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_invoke.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_invoke.java index a60a22ce7ff..ccd179edb6b 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_invoke.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_invoke.java @@ -29,8 +29,8 @@ public abstract class Callback_Object_ice_invoke public abstract void response(boolean ret, byte[] outParams); @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_invoke_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_invoke_completed(this, result); } } diff --git a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_isA.java b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_isA.java index 8ccba433133..af875d4b391 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_isA.java +++ b/java-compat/src/Ice/src/main/java/Ice/Callback_Object_ice_isA.java @@ -17,14 +17,14 @@ public abstract class Callback_Object_ice_isA extends IceInternal.TwowayCallback /** * Called when the invocation completes successfully. * - * @param __ret True if the target object supports the given interface, false otherwise. + * @param ret True if the target object supports the given interface, false otherwise. **/ @Override - public abstract void response(boolean __ret); + public abstract void response(boolean ret); @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_isA_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_isA_completed(this, result); } } diff --git a/java-compat/src/Ice/src/main/java/Ice/CommunicatorI.java b/java-compat/src/Ice/src/main/java/Ice/CommunicatorI.java index 8ca4682639c..de973f2c75a 100644 --- a/java-compat/src/Ice/src/main/java/Ice/CommunicatorI.java +++ b/java-compat/src/Ice/src/main/java/Ice/CommunicatorI.java @@ -233,29 +233,29 @@ public final class CommunicatorI implements Communicator @Override public AsyncResult - begin_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_flushBatchRequests(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { return begin_flushBatchRequestsInternal( - new IceInternal.Functional_CallbackBase(false, __exceptionCb, __sentCb) + new IceInternal.Functional_CallbackBase(false, exceptionCb, sentCb) { @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { try { - __result.getCommunicator().end_flushBatchRequests(__result); + result.getCommunicator().end_flushBatchRequests(result); } - catch(Exception __ex) + catch(Exception ex) { - __exceptionCb.apply(__ex); + _exceptionCb.apply(ex); } } }); } - private static final String __flushBatchRequests_name = "flushBatchRequests"; + private static final String _flushBatchRequests_name = "flushBatchRequests"; private Ice.AsyncResult begin_flushBatchRequestsInternal(IceInternal.CallbackBase cb) @@ -269,7 +269,7 @@ public final class CommunicatorI implements Communicator // IceInternal.CommunicatorFlushBatch result = new IceInternal.CommunicatorFlushBatch(this, _instance, - __flushBatchRequests_name, + _flushBatchRequests_name, cb); connectionFactory.flushAsyncBatchRequests(result); @@ -289,8 +289,8 @@ public final class CommunicatorI implements Communicator end_flushBatchRequests(AsyncResult r) { IceInternal.CommunicatorFlushBatch ri = - IceInternal.CommunicatorFlushBatch.check(r, this, __flushBatchRequests_name); - ri.__wait(); + IceInternal.CommunicatorFlushBatch.check(r, this, _flushBatchRequests_name); + ri.waitForResponseOrUserEx(); } diff --git a/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java b/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java index cac2a6fb3d2..92d1c6fee04 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java +++ b/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java @@ -423,7 +423,7 @@ public final class ConnectionI extends IceInternal.EventHandler end_flushBatchRequests(begin_flushBatchRequests()); } - private static final String __flushBatchRequests_name = "flushBatchRequests"; + private static final String _flushBatchRequests_name = "flushBatchRequests"; @Override public Ice.AsyncResult begin_flushBatchRequests() @@ -444,22 +444,22 @@ public final class ConnectionI extends IceInternal.EventHandler } @Override - public AsyncResult begin_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + public AsyncResult begin_flushBatchRequests(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_flushBatchRequestsInternal(new IceInternal.Functional_CallbackBase(false, __exceptionCb, __sentCb) + return begin_flushBatchRequestsInternal(new IceInternal.Functional_CallbackBase(false, exceptionCb, sentCb) { @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { try { - __result.getConnection().end_flushBatchRequests(__result); + result.getConnection().end_flushBatchRequests(result); } - catch(Exception __ex) + catch(Exception ex) { - __exceptionCb.apply(__ex); + _exceptionCb.apply(ex); } } }); @@ -468,7 +468,7 @@ public final class ConnectionI extends IceInternal.EventHandler private Ice.AsyncResult begin_flushBatchRequestsInternal(IceInternal.CallbackBase cb) { IceInternal.ConnectionFlushBatch result = - new IceInternal.ConnectionFlushBatch(this, _communicator, _instance, __flushBatchRequests_name, cb); + new IceInternal.ConnectionFlushBatch(this, _communicator, _instance, _flushBatchRequests_name, cb); result.invoke(); return result; } @@ -477,8 +477,8 @@ public final class ConnectionI extends IceInternal.EventHandler public void end_flushBatchRequests(AsyncResult ir) { IceInternal.ConnectionFlushBatch r = - IceInternal.ConnectionFlushBatch.check(ir, this, __flushBatchRequests_name); - r.__wait(); + IceInternal.ConnectionFlushBatch.check(ir, this, _flushBatchRequests_name); + r.waitForResponseOrUserEx(); } @Override @@ -887,10 +887,10 @@ public final class ConnectionI extends IceInternal.EventHandler throw ex; } - _readProtocol.__read(_readStream); + _readProtocol.read(_readStream); IceInternal.Protocol.checkSupportedProtocol(_readProtocol); - _readProtocolEncoding.__read(_readStream); + _readProtocolEncoding.read(_readStream); IceInternal.Protocol.checkSupportedProtocolEncoding(_readProtocolEncoding); _readStream.readByte(); // messageType @@ -1885,8 +1885,8 @@ public final class ConnectionI extends IceInternal.EventHandler // OutputStream os = new OutputStream(_instance, IceInternal.Protocol.currentProtocolEncoding); os.writeBlob(IceInternal.Protocol.magic); - IceInternal.Protocol.currentProtocol.__write(os); - IceInternal.Protocol.currentProtocolEncoding.__write(os); + IceInternal.Protocol.currentProtocol.write(os); + IceInternal.Protocol.currentProtocolEncoding.write(os); os.writeByte(IceInternal.Protocol.closeConnectionMsg); os.writeByte((byte) 0); // compression status: always report 0 for // CloseConnection in Java. @@ -1918,8 +1918,8 @@ public final class ConnectionI extends IceInternal.EventHandler { OutputStream os = new OutputStream(_instance, IceInternal.Protocol.currentProtocolEncoding); os.writeBlob(IceInternal.Protocol.magic); - IceInternal.Protocol.currentProtocol.__write(os); - IceInternal.Protocol.currentProtocolEncoding.__write(os); + IceInternal.Protocol.currentProtocol.write(os); + IceInternal.Protocol.currentProtocolEncoding.write(os); os.writeByte(IceInternal.Protocol.validateConnectionMsg); os.writeByte((byte) 0); os.writeInt(IceInternal.Protocol.headerSize); // Message size. @@ -1969,8 +1969,8 @@ public final class ConnectionI extends IceInternal.EventHandler if(_writeStream.isEmpty()) { _writeStream.writeBlob(IceInternal.Protocol.magic); - IceInternal.Protocol.currentProtocol.__write(_writeStream); - IceInternal.Protocol.currentProtocolEncoding.__write(_writeStream); + IceInternal.Protocol.currentProtocol.write(_writeStream); + IceInternal.Protocol.currentProtocolEncoding.write(_writeStream); _writeStream.writeByte(IceInternal.Protocol.validateConnectionMsg); _writeStream.writeByte((byte) 0); // Compression status // (always zero for @@ -2043,10 +2043,10 @@ public final class ConnectionI extends IceInternal.EventHandler throw ex; } - _readProtocol.__read(_readStream); + _readProtocol.read(_readStream); IceInternal.Protocol.checkSupportedProtocol(_readProtocol); - _readProtocolEncoding.__read(_readStream); + _readProtocolEncoding.read(_readStream); IceInternal.Protocol.checkSupportedProtocolEncoding(_readProtocolEncoding); byte messageType = _readStream.readByte(); diff --git a/java-compat/src/Ice/src/main/java/Ice/DispatchInterceptor.java b/java-compat/src/Ice/src/main/java/Ice/DispatchInterceptor.java index cd926273a1c..6bd982836af 100644 --- a/java-compat/src/Ice/src/main/java/Ice/DispatchInterceptor.java +++ b/java-compat/src/Ice/src/main/java/Ice/DispatchInterceptor.java @@ -37,7 +37,7 @@ public abstract class DispatchInterceptor extends ObjectImpl @Override public boolean - __dispatch(IceInternal.Incoming in, Current current) + _iceDispatch(IceInternal.Incoming in, Current current) throws Ice.UserException { try diff --git a/java-compat/src/Ice/src/main/java/Ice/InputStream.java b/java-compat/src/Ice/src/main/java/Ice/InputStream.java index b1895b6d19e..46ad2ffdbf1 100644 --- a/java-compat/src/Ice/src/main/java/Ice/InputStream.java +++ b/java-compat/src/Ice/src/main/java/Ice/InputStream.java @@ -581,7 +581,7 @@ public class InputStream _encapsStack.sz = sz; EncodingVersion encoding = new EncodingVersion(); - encoding.__read(this); + encoding.read(this); IceInternal.Protocol.checkSupportedEncoding(encoding); // Make sure the encoding is supported. _encapsStack.setEncoding(encoding); @@ -691,7 +691,7 @@ public class InputStream if(encoding != null) { - encoding.__read(this); + encoding.read(this); _buf.b.position(_buf.b.position() - 6); } else @@ -745,7 +745,7 @@ public class InputStream throw new UnmarshalOutOfBoundsException(); } EncodingVersion encoding = new EncodingVersion(); - encoding.__read(this); + encoding.read(this); try { _buf.b.position(_buf.b.position() + sz - 6); @@ -2321,7 +2321,7 @@ public class InputStream // // Read the instance. // - v.__read(_stream); + v._iceRead(_stream); if(_patchMap != null) { @@ -2495,7 +2495,7 @@ public class InputStream // if(userEx != null) { - userEx.__read(_stream); + userEx._read(_stream); if(usesClasses) { readPendingValues(); @@ -2800,7 +2800,7 @@ public class InputStream // if(userEx != null) { - userEx.__read(_stream); + userEx._read(_stream); throw userEx; // Never reached. diff --git a/java-compat/src/Ice/src/main/java/Ice/Object.java b/java-compat/src/Ice/src/main/java/Ice/Object.java index 9e206cc5daa..16be3bc3b48 100644 --- a/java-compat/src/Ice/src/main/java/Ice/Object.java +++ b/java-compat/src/Ice/src/main/java/Ice/Object.java @@ -157,11 +157,11 @@ public interface Object boolean ice_dispatch(Request request) throws Ice.UserException; - boolean __dispatch(IceInternal.Incoming in, Current current) + boolean _iceDispatch(IceInternal.Incoming in, Current current) throws Ice.UserException; - void __write(OutputStream __os); - void __read(InputStream __is); + void _iceWrite(OutputStream ostr); + void _iceRead(InputStream istr); public static final String ice_staticId = "::Ice::Object"; } diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectAdapterI.java b/java-compat/src/Ice/src/main/java/Ice/ObjectAdapterI.java index 53abcf4b4b6..f0497ea6b7c 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectAdapterI.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectAdapterI.java @@ -517,7 +517,7 @@ public final class ObjectAdapterI implements ObjectAdapter { checkForDeactivation(); - IceInternal.Reference ref = ((ObjectPrxHelperBase)proxy).__reference(); + IceInternal.Reference ref = ((ObjectPrxHelperBase)proxy)._getReference(); return findFacet(ref.getIdentity(), ref.getFacet()); } @@ -673,7 +673,7 @@ public final class ObjectAdapterI implements ObjectAdapter // it can be called for AMI invocations if the proxy has no delegate set yet. // - IceInternal.Reference ref = ((ObjectPrxHelperBase)proxy).__reference(); + IceInternal.Reference ref = ((ObjectPrxHelperBase)proxy)._getReference(); if(ref.isWellKnown()) { // diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectImpl.java b/java-compat/src/Ice/src/main/java/Ice/ObjectImpl.java index 8977247d96d..f00078df4c9 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectImpl.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectImpl.java @@ -45,7 +45,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io return c; } - public final static String[] __ids = + private final static String[] _ids = { "::Ice::Object" }; @@ -61,7 +61,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public boolean ice_isA(String s) { - return s.equals(__ids[0]); + return s.equals(_ids[0]); } /** @@ -76,19 +76,19 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public boolean ice_isA(String s, Current current) { - return s.equals(__ids[0]); + return s.equals(_ids[0]); } public static boolean - ___ice_isA(Ice.Object __obj, IceInternal.Incoming __inS, Current __current) + _iceD_ice_isA(Ice.Object obj, IceInternal.Incoming inS, Current current) { - InputStream __is = __inS.startReadParams(); - String __id = __is.readString(); - __inS.endReadParams(); - boolean __ret = __obj.ice_isA(__id, __current); - OutputStream __os = __inS.startWriteParams(); - __os.writeBool(__ret); - __inS.endWriteParams(); + InputStream istr = inS.startReadParams(); + String id = istr.readString(); + inS.endReadParams(); + boolean ret = obj.ice_isA(id, current); + OutputStream ostr = inS.startWriteParams(); + ostr.writeBool(ret); + inS.endWriteParams(); return false; } @@ -115,11 +115,11 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io } public static boolean - ___ice_ping(Ice.Object __obj, IceInternal.Incoming __inS, Current __current) + _iceD_ice_ping(Ice.Object obj, IceInternal.Incoming inS, Current current) { - __inS.readEmptyParams(); - __obj.ice_ping(__current); - __inS.writeEmptyParams(); + inS.readEmptyParams(); + obj.ice_ping(current); + inS.writeEmptyParams(); return false; } @@ -132,7 +132,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public String[] ice_ids() { - return __ids; + return _ids; } /** @@ -145,17 +145,17 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public String[] ice_ids(Current current) { - return __ids; + return _ids; } public static boolean - ___ice_ids(Ice.Object __obj, IceInternal.Incoming __inS, Current __current) + _iceD_ice_ids(Ice.Object obj, IceInternal.Incoming inS, Current current) { - __inS.readEmptyParams(); - String[] __ret = __obj.ice_ids(__current); - OutputStream __os = __inS.startWriteParams(); - __os.writeStringSeq(__ret); - __inS.endWriteParams(); + inS.readEmptyParams(); + String[] ret = obj.ice_ids(current); + OutputStream ostr = inS.startWriteParams(); + ostr.writeStringSeq(ret); + inS.endWriteParams(); return false; } @@ -168,7 +168,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public String ice_id() { - return __ids[0]; + return _ids[0]; } /** @@ -181,17 +181,17 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public String ice_id(Current current) { - return __ids[0]; + return _ids[0]; } public static boolean - ___ice_id(Ice.Object __obj, IceInternal.Incoming __inS, Current __current) + _iceD_ice_id(Ice.Object obj, IceInternal.Incoming inS, Current current) { - __inS.readEmptyParams(); - String __ret = __obj.ice_id(__current); - OutputStream __os = __inS.startWriteParams(); - __os.writeString(__ret); - __inS.endWriteParams(); + inS.readEmptyParams(); + String ret = obj.ice_id(current); + OutputStream ostr = inS.startWriteParams(); + ostr.writeString(ret); + inS.endWriteParams(); return false; } @@ -203,7 +203,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io public static String ice_staticId() { - return __ids[0]; + return _ids[0]; } /** @@ -258,7 +258,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io { } - private final static String[] __all = + private final static String[] _all = { "ice_id", "ice_ids", @@ -290,7 +290,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io in.push(cb); try { - return __dispatch(in, in.getCurrent()); + return _iceDispatch(in, in.getCurrent()); } finally { @@ -299,7 +299,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io } else { - return __dispatch(in, in.getCurrent()); + return _iceDispatch(in, in.getCurrent()); } } @@ -322,10 +322,10 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io @Override public boolean - __dispatch(IceInternal.Incoming in, Current current) + _iceDispatch(IceInternal.Incoming in, Current current) throws Ice.UserException { - int pos = java.util.Arrays.binarySearch(__all, current.operation); + int pos = java.util.Arrays.binarySearch(_all, current.operation); if(pos < 0) { throw new Ice.OperationNotExistException(current.id, current.facet, current.operation); @@ -335,19 +335,19 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io { case 0: { - return ___ice_id(this, in, current); + return _iceD_ice_id(this, in, current); } case 1: { - return ___ice_ids(this, in, current); + return _iceD_ice_ids(this, in, current); } case 2: { - return ___ice_isA(this, in, current); + return _iceD_ice_isA(this, in, current); } case 3: { - return ___ice_ping(this, in, current); + return _iceD_ice_ping(this, in, current); } } @@ -357,29 +357,29 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io @Override public void - __write(OutputStream os) + _iceWrite(OutputStream os) { os.startValue(null); - __writeImpl(os); + _iceWriteImpl(os); os.endValue(); } @Override public void - __read(InputStream is) + _iceRead(InputStream is) { is.startValue(); - __readImpl(is); + _iceReadImpl(is); is.endValue(false); } protected void - __writeImpl(OutputStream os) + _iceWriteImpl(OutputStream os) { } protected void - __readImpl(InputStream is) + _iceReadImpl(InputStream is) { } @@ -404,7 +404,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io } protected static void - __checkMode(OperationMode expected, OperationMode received) + _iceCheckMode(OperationMode expected, OperationMode received) { if(expected != received) { diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java b/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java index b97f6e16a43..4489a0a5c62 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java @@ -24,138 +24,138 @@ public interface ObjectPrx /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. + * @param id The type ID of the Slice interface to test against. * @return <code>true</code> if the target object has the interface - * specified by <code>__id</code> or derives from the interface - * specified by <code>__id</code>. + * specified by <code>id</code> or derives from the interface + * specified by <code>id</code>. **/ - boolean ice_isA(String __id); + boolean ice_isA(String id); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. - * @param __context The context map for the invocation. + * @param id The type ID of the Slice interface to test against. + * @param context The context map for the invocation. * @return <code>true</code> if the target object has the interface - * specified by <code>__id</code> or derives from the interface - * specified by <code>__id</code>. + * specified by <code>id</code> or derives from the interface + * specified by <code>id</code>. **/ - boolean ice_isA(String __id, java.util.Map<String, String> __context); + boolean ice_isA(String id, java.util.Map<String, String> context); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. + * @param id The type ID of the Slice interface to test against. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id); + AsyncResult begin_ice_isA(String id); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. - * @param __context The context map for the invocation. + * @param id The type ID of the Slice interface to test against. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context); + AsyncResult begin_ice_isA(String id, java.util.Map<String, String> context); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. - * @param __cb The asynchronous callback object. + * @param id The type ID of the Slice interface to test against. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, Callback __cb); + AsyncResult begin_ice_isA(String id, Callback cb); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param id The type ID of the Slice interface to test against. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, Callback __cb); + AsyncResult begin_ice_isA(String id, java.util.Map<String, String> context, Callback cb); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. - * @param __cb The asynchronous callback object. + * @param id The type ID of the Slice interface to test against. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, Callback_Object_ice_isA __cb); + AsyncResult begin_ice_isA(String id, Callback_Object_ice_isA cb); /** * Tests whether this object supports a specific Slice interface. * - * @param __id The type ID of the Slice interface to test against. - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param id The type ID of the Slice interface to test against. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, Callback_Object_ice_isA __cb); + AsyncResult begin_ice_isA(String id, java.util.Map<String, String> context, Callback_Object_ice_isA cb); /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param id The Slice type ID of an interface. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_isA(String id, IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param id The Slice type ID of an interface. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_isA(String id, IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_isA(String id, java.util.Map<String, String> context, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_isA(String id, java.util.Map<String, String> context, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Completes the asynchronous ice_isA request. * - * @param __result The asynchronous result. + * @param result The asynchronous result. * @return <code>true</code> if this proxy supports the specified interface; <code>false</code>, otherwise. **/ - boolean end_ice_isA(AsyncResult __result); + boolean end_ice_isA(AsyncResult result); /** * Tests whether the target object of this proxy can be reached. @@ -165,9 +165,9 @@ public interface ObjectPrx /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. **/ - void ice_ping(java.util.Map<String, String> __context); + void ice_ping(java.util.Map<String, String> context); /** * Tests whether the target object of this proxy can be reached. @@ -179,99 +179,99 @@ public interface ObjectPrx /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(java.util.Map<String, String> __context); + AsyncResult begin_ice_ping(java.util.Map<String, String> context); /** * Tests whether the target object of this proxy can be reached. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(Callback __cb); + AsyncResult begin_ice_ping(Callback cb); /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(java.util.Map<String, String> __context, Callback __cb); + AsyncResult begin_ice_ping(java.util.Map<String, String> context, Callback cb); /** * Tests whether the target object of this proxy can be reached. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(Callback_Object_ice_ping __cb); + AsyncResult begin_ice_ping(Callback_Object_ice_ping cb); /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(java.util.Map<String, String> __context, Callback_Object_ice_ping __cb); + AsyncResult begin_ice_ping(java.util.Map<String, String> context, Callback_Object_ice_ping cb); /** * Tests whether the target object of this proxy can be reached. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_ping(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Tests whether the target object of this proxy can be reached. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_ping(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(java.util.Map<String, String> __context, - IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_ping(java.util.Map<String, String> context, + IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ping(java.util.Map<String, String> __context, - IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_ping(java.util.Map<String, String> context, + IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Completes the asynchronous ice_ping request. * - * @param __result The asynchronous result. + * @param result The asynchronous result. **/ - void end_ice_ping(AsyncResult __result); + void end_ice_ping(AsyncResult result); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. @@ -284,11 +284,11 @@ public interface ObjectPrx /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived * order. The first element of the returned array is always <code>::Ice::Object</code>. **/ - String[] ice_ids(java.util.Map<String, String> __context); + String[] ice_ids(java.util.Map<String, String> context); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. @@ -300,101 +300,101 @@ public interface ObjectPrx /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(java.util.Map<String, String> __context); + AsyncResult begin_ice_ids(java.util.Map<String, String> context); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(Callback __cb); + AsyncResult begin_ice_ids(Callback cb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(java.util.Map<String, String> __context, Callback __cb); + AsyncResult begin_ice_ids(java.util.Map<String, String> context, Callback cb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(Callback_Object_ice_ids __cb); + AsyncResult begin_ice_ids(Callback_Object_ice_ids cb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(java.util.Map<String, String> __context, Callback_Object_ice_ids __cb); + AsyncResult begin_ice_ids(java.util.Map<String, String> context, Callback_Object_ice_ids cb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_ids(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_ids(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_ids(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Completes the asynchronous ice_ids request. * - * @param __result The asynchronous result. + * @param result The asynchronous result. * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived * order. The first element of the returned array is always <code>::Ice::Object</code>. **/ - String[] end_ice_ids(AsyncResult __result); + String[] end_ice_ids(AsyncResult result); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. @@ -406,10 +406,10 @@ public interface ObjectPrx /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The Slice type ID of the most-derived interface. **/ - String ice_id(java.util.Map<String, String> __context); + String ice_id(java.util.Map<String, String> context); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. @@ -421,100 +421,100 @@ public interface ObjectPrx /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(java.util.Map<String, String> __context); + AsyncResult begin_ice_id(java.util.Map<String, String> context); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(Callback __cb); + AsyncResult begin_ice_id(Callback cb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(java.util.Map<String, String> __context, Callback __cb); + AsyncResult begin_ice_id(java.util.Map<String, String> context, Callback cb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(Callback_Object_ice_id __cb); + AsyncResult begin_ice_id(Callback_Object_ice_id cb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(java.util.Map<String, String> __context, Callback_Object_ice_id __cb); + AsyncResult begin_ice_id(java.util.Map<String, String> context, Callback_Object_ice_id cb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_id(IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_id(IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_id(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_id(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_id(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Completes the asynchronous ice_id request. * - * @param __result The asynchronous result. + * @param result The asynchronous result. * @return The Slice type ID of the most-derived interface. **/ - String end_ice_id(AsyncResult __result); + String end_ice_id(AsyncResult result); /** * Invokes an operation dynamically. @@ -543,7 +543,7 @@ public interface ObjectPrx * @param inParams The encoded in-parameters for the operation. * @param outParams The encoded out-paramaters and return value * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return If the operation completed successfully, the return value * is <code>true</code>. If the operation raises a user exception, * the return value is <code>false</code>; in this case, <code>outParams</code> @@ -554,7 +554,7 @@ public interface ObjectPrx * @see OperationMode **/ boolean ice_invoke(String operation, OperationMode mode, byte[] inParams, ByteSeqHolder outParams, - java.util.Map<String, String> __context); + java.util.Map<String, String> context); /** * Invokes an operation dynamically and asynchronously. @@ -576,14 +576,14 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context); + java.util.Map<String, String> context); /** * Invokes an operation dynamically and asynchronously. @@ -592,13 +592,13 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ - AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, Callback __cb); + AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, Callback cb); /** * Invokes an operation dynamically and asynchronously. @@ -607,15 +607,15 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context, Callback __cb); + java.util.Map<String, String> context, Callback cb); /** * Invokes an operation dynamically and asynchronously. @@ -624,14 +624,14 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - Callback_Object_ice_invoke __cb); + Callback_Object_ice_invoke cb); /** * Invokes an operation dynamically and asynchronously. @@ -640,15 +640,15 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context, Callback_Object_ice_invoke __cb); + java.util.Map<String, String> context, Callback_Object_ice_invoke cb); public interface FunctionalCallback_Object_ice_invoke_Response { @@ -662,18 +662,18 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - FunctionalCallback_Object_ice_invoke_Response __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Invokes an operation dynamically and asynchronously. @@ -682,16 +682,16 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - FunctionalCallback_Object_ice_invoke_Response __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Invokes an operation dynamically and asynchronously. @@ -699,21 +699,21 @@ public interface ObjectPrx * @param operation The name of the operation to invoke. * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * for the operation. The return value follows any out-parameters. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context, - FunctionalCallback_Object_ice_invoke_Response __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + java.util.Map<String, String> context, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Invokes an operation dynamically and asynchronously. @@ -721,32 +721,32 @@ public interface ObjectPrx * @param operation The name of the operation to invoke. * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * for the operation. The return value follows any out-parameters. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. * * @see Blobject * @see OperationMode **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context, - FunctionalCallback_Object_ice_invoke_Response __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + java.util.Map<String, String> context, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Completes the asynchronous ice_invoke request. * * @param outParams The encoded out-paramaters and return value. - * @param __result The asynchronous result. + * @param result The asynchronous result. * @return If the operation completed successfully, the return value * is <code>true</code>. If the operation raises a user exception, * the return value is <code>false</code>; in this case, <code>outParams</code> * contains the encoded user exception. If the operation raises a run-time exception, * it throws it directly. **/ - boolean end_ice_invoke(ByteSeqHolder outParams, AsyncResult __result); + boolean end_ice_invoke(ByteSeqHolder outParams, AsyncResult result); /** * Returns the identity embedded in this proxy. @@ -1113,37 +1113,37 @@ public interface ObjectPrx /** * Asynchronously gets the connection for this proxy. The call does not block. * - * @param __cb The callback object to notify the application when the operation is complete. + * @param cb The callback object to notify the application when the operation is complete. * @return The asynchronous result object. **/ - AsyncResult begin_ice_getConnection(Callback __cb); + AsyncResult begin_ice_getConnection(Callback cb); /** * Asynchronously gets the connection for this proxy. The call does not block. * - * @param __cb The callback object to notify the application when the operation is complete. + * @param cb The callback object to notify the application when the operation is complete. * @return The asynchronous result object. **/ - AsyncResult begin_ice_getConnection(Callback_Object_ice_getConnection __cb); + AsyncResult begin_ice_getConnection(Callback_Object_ice_getConnection cb); /** * Asynchronously gets the connection for this proxy. The call does not block. * - * @param __responseCb The callback object to notify the application when there is a response available. - * @param __exceptionCb The callback object to notify the application when an exception occurs while getting + * @param responseCb The callback object to notify the application when there is a response available. + * @param exceptionCb The callback object to notify the application when an exception occurs while getting * the connection. * @return The asynchronous result object. **/ - AsyncResult begin_ice_getConnection(IceInternal.Functional_GenericCallback1<Ice.Connection> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb); + AsyncResult begin_ice_getConnection(IceInternal.Functional_GenericCallback1<Ice.Connection> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb); /** * Completes the asynchronous get connection. * - * @param __result The asynchronous result. + * @param result The asynchronous result. * @return The connection object. **/ - Ice.Connection end_ice_getConnection(AsyncResult __result); + Ice.Connection end_ice_getConnection(AsyncResult result); /** * Returns the cached {@link Connection} for this proxy. If the proxy does not yet have an established @@ -1173,37 +1173,37 @@ public interface ObjectPrx /** * Asynchronously flushes any pending batched requests for this communicator. The call does not block. * - * @param __cb The callback object to notify the application when the flush is complete. + * @param cb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ - AsyncResult begin_ice_flushBatchRequests(Callback __cb); + AsyncResult begin_ice_flushBatchRequests(Callback cb); /** * Asynchronously flushes any pending batched requests for this communicator. The call does not block. * - * @param __cb The callback object to notify the application when the flush is complete. + * @param cb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ - AsyncResult begin_ice_flushBatchRequests(Callback_Object_ice_flushBatchRequests __cb); + AsyncResult begin_ice_flushBatchRequests(Callback_Object_ice_flushBatchRequests cb); /** * Asynchronously flushes any pending batched requests for this communicator. The call does not block. * - * @param __responseCb The asynchronous completion callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous completion callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ - AsyncResult begin_ice_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb); + AsyncResult begin_ice_flushBatchRequests(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb); /** * Completes the asynchronous flush request. * - * @param __result The asynchronous result. + * @param result The asynchronous result. **/ - void end_ice_flushBatchRequests(AsyncResult __result); + void end_ice_flushBatchRequests(AsyncResult result); /** * Returns whether this proxy equals the passed object. Two proxies are equal if they are equal in all respects, @@ -1215,5 +1215,5 @@ public interface ObjectPrx @Override boolean equals(java.lang.Object r); - void __write(OutputStream os); + void _write(OutputStream os); } diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelper.java b/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelper.java index 77c758ef68e..6cd18a11792 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelper.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelper.java @@ -65,7 +65,7 @@ public class ObjectPrxHelper extends ObjectPrxHelperBase boolean ok = bb.ice_isA("::Ice::Object"); assert(ok); ObjectPrxHelper h = new ObjectPrxHelper(); - h.__copyFrom(bb); + h._copyFrom(bb); d = h; } catch(Ice.FacetNotExistException ex) @@ -98,7 +98,7 @@ public class ObjectPrxHelper extends ObjectPrxHelperBase boolean ok = bb.ice_isA("::Ice::Object", ctx); assert(ok); ObjectPrxHelper h = new ObjectPrxHelper(); - h.__copyFrom(bb); + h._copyFrom(bb); d = h; } catch(Ice.FacetNotExistException ex) @@ -137,7 +137,7 @@ public class ObjectPrxHelper extends ObjectPrxHelperBase { Ice.ObjectPrx bb = b.ice_facet(f); ObjectPrxHelper h = new ObjectPrxHelper(); - h.__copyFrom(bb); + h._copyFrom(bb); d = h; } return d; diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java b/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java index fa60f0a62f2..cb6ccb2adb2 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java @@ -59,298 +59,298 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. + * @param id The Slice type ID of an interface. * @return <code>true</code> if this proxy supports the specified interface; <code>false</code>, otherwise. **/ @Override public final boolean - ice_isA(String __id) + ice_isA(String id) { - return ice_isA(__id, null, false); + return _iceI_ice_isA(id, null, false); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. * @return <code>true</code> if this proxy supports the specified interface; <code>false</code>, otherwise. **/ @Override public final boolean - ice_isA(String __id, java.util.Map<String, String> __context) + ice_isA(String id, java.util.Map<String, String> context) { - return ice_isA(__id, __context, true); + return _iceI_ice_isA(id, context, true); } - private static final String __ice_isA_name = "ice_isA"; + private static final String _ice_isA_name = "ice_isA"; private boolean - ice_isA(String __id, java.util.Map<String, String> __context, boolean __explicitCtx) + _iceI_ice_isA(String id, java.util.Map<String, String> context, boolean explicitCtx) { - __checkTwowayOnly(__ice_isA_name); - return end_ice_isA(begin_ice_isA(__id, __context, __explicitCtx, true, null)); + _checkTwowayOnly(_ice_isA_name); + return end_ice_isA(_iceI_begin_ice_isA(id, context, explicitCtx, true, null)); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. + * @param id The Slice type ID of an interface. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id) + begin_ice_isA(String id) { - return begin_ice_isA(__id, null, false, false, null); + return _iceI_begin_ice_isA(id, null, false, false, null); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, java.util.Map<String, String> __context) + begin_ice_isA(String id, java.util.Map<String, String> context) { - return begin_ice_isA(__id, __context, true, false, null); + return _iceI_begin_ice_isA(id, context, true, false, null); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __cb The asynchronous callback object. + * @param id The Slice type ID of an interface. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, Callback __cb) + begin_ice_isA(String id, Callback cb) { - return begin_ice_isA(__id, null, false, false, __cb); + return _iceI_begin_ice_isA(id, null, false, false, cb); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. - * @param __cb The asynchronous callback object. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, java.util.Map<String, String> __context, Callback __cb) + begin_ice_isA(String id, java.util.Map<String, String> context, Callback cb) { - return begin_ice_isA(__id, __context, true, false, __cb); + return _iceI_begin_ice_isA(id, context, true, false, cb); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __cb The asynchronous callback object. + * @param id The Slice type ID of an interface. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, Callback_Object_ice_isA __cb) + begin_ice_isA(String id, Callback_Object_ice_isA cb) { - return begin_ice_isA(__id, null, false, false, __cb); + return _iceI_begin_ice_isA(id, null, false, false, cb); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. - * @param __cb The asynchronous callback object. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, java.util.Map<String, String> __context, Callback_Object_ice_isA __cb) + begin_ice_isA(String id, java.util.Map<String, String> context, Callback_Object_ice_isA cb) { - return begin_ice_isA(__id, __context, true, false, __cb); + return _iceI_begin_ice_isA(id, context, true, false, cb); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param id The Slice type ID of an interface. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_isA(String id, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_isA(__id, null, false, false, __responseCb, __exceptionCb, null); + return _iceI_begin_ice_isA(id, null, false, false, responseCb, exceptionCb, null); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param id The Slice type ID of an interface. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_isA(String id, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_isA(__id, null, false, false, __responseCb, __exceptionCb, __sentCb); + return _iceI_begin_ice_isA(id, null, false, false, responseCb, exceptionCb, sentCb); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, - java.util.Map<String, String> __context, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_isA(String id, + java.util.Map<String, String> context, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_isA(__id, __context, true, false, __responseCb, __exceptionCb, null); + return _iceI_begin_ice_isA(id, context, true, false, responseCb, exceptionCb, null); } /** * Tests whether this proxy supports a given interface. * - * @param __id The Slice type ID of an interface. - * @param __context The <code>Context</code> map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param id The Slice type ID of an interface. + * @param context The <code>Context</code> map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_isA(String __id, - java.util.Map<String, String> __context, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_isA(String id, + java.util.Map<String, String> context, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_isA(__id, __context, true, false, __responseCb, __exceptionCb, __sentCb); + return _iceI_begin_ice_isA(id, context, true, false, responseCb, exceptionCb, sentCb); } private AsyncResult - begin_ice_isA(String __id, - java.util.Map<String, String> __context, - boolean __explicitCtx, - boolean __synchronous, - IceInternal.Functional_BoolCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) - { - return begin_ice_isA(__id, __context, __explicitCtx, __synchronous, - new IceInternal.Functional_TwowayCallbackBool(__responseCb, __exceptionCb, __sentCb) - { - @Override - public final void __completed(AsyncResult __result) - { - ObjectPrxHelperBase.__ice_isA_completed(this, __result); - } - }); + _iceI_begin_ice_isA(String id, + java.util.Map<String, String> context, + boolean explicitCtx, + boolean synchronous, + IceInternal.Functional_BoolCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) + { + return _iceI_begin_ice_isA(id, context, explicitCtx, synchronous, + new IceInternal.Functional_TwowayCallbackBool(responseCb, exceptionCb, sentCb) + { + @Override + public final void _iceCompleted(AsyncResult result) + { + ObjectPrxHelperBase._iceI_ice_isA_completed(this, result); + } + }); } private AsyncResult - begin_ice_isA(String __id, java.util.Map<String, String> __context, boolean __explicitCtx, - boolean __synchronous, IceInternal.CallbackBase __cb) + _iceI_begin_ice_isA(String id, java.util.Map<String, String> context, boolean explicitCtx, + boolean synchronous, IceInternal.CallbackBase cb) { - __checkAsyncTwowayOnly(__ice_isA_name); - IceInternal.OutgoingAsync __result = getOutgoingAsync(__ice_isA_name, __cb); + _checkAsyncTwowayOnly(_ice_isA_name); + IceInternal.OutgoingAsync result = getOutgoingAsync(_ice_isA_name, cb); try { - __result.prepare(__ice_isA_name, OperationMode.Nonmutating, __context, __explicitCtx, __synchronous); - OutputStream __os = __result.startWriteParams(Ice.FormatType.DefaultFormat); - __os.writeString(__id); - __result.endWriteParams(); - __result.invoke(); + result.prepare(_ice_isA_name, OperationMode.Nonmutating, context, explicitCtx, synchronous); + OutputStream ostr = result.startWriteParams(Ice.FormatType.DefaultFormat); + ostr.writeString(id); + result.endWriteParams(); + result.invoke(); } - catch(Exception __ex) + catch(Exception ex) { - __result.abort(__ex); + result.abort(ex); } - return __result; + return result; } /** * Completes the asynchronous ice_isA request. * - * @param __r The asynchronous result. + * @param r The asynchronous result. * @return <code>true</code> if this proxy supports the specified interface; <code>false</code>, otherwise. **/ @Override public final boolean - end_ice_isA(AsyncResult __r) + end_ice_isA(AsyncResult r) { - IceInternal.OutgoingAsync __result = IceInternal.OutgoingAsync.check(__r, this, __ice_isA_name); + IceInternal.OutgoingAsync result = IceInternal.OutgoingAsync.check(r, this, _ice_isA_name); try { - if(!__result.__wait()) + if(!result.waitForResponseOrUserEx()) { try { - __result.throwUserException(); + result.throwUserException(); } - catch(UserException __ex) + catch(UserException ex) { - throw new UnknownUserException(__ex.ice_id(), __ex); + throw new UnknownUserException(ex.ice_id(), ex); } } - boolean __ret; - InputStream __is = __result.startReadParams(); - __ret = __is.readBool(); - __result.endReadParams(); - return __ret; + boolean ret; + InputStream istr = result.startReadParams(); + ret = istr.readBool(); + result.endReadParams(); + return ret; } finally { - if(__result != null) + if(result != null) { - __result.cacheMessageBuffers(); + result.cacheMessageBuffers(); } } } - static public void __ice_isA_completed(TwowayCallbackBool __cb, AsyncResult __result) + static public void _iceI_ice_isA_completed(TwowayCallbackBool cb, AsyncResult result) { - boolean __ret = false; + boolean ret = false; try { - __ret = __result.getProxy().end_ice_isA(__result); + ret = result.getProxy().end_ice_isA(result); } - catch(LocalException __ex) + catch(LocalException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - catch(SystemException __ex) + catch(SystemException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - __cb.response(__ret); + cb.response(ret); } /** @@ -360,27 +360,27 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final void ice_ping() { - ice_ping(null, false); + _iceI_ice_ping(null, false); } /** * Tests whether the target object of this proxy can be reached. * - * @param __context The <code>Context</code> map for the invocation. + * @param context The <code>Context</code> map for the invocation. **/ @Override public final void - ice_ping(java.util.Map<String, String> __context) + ice_ping(java.util.Map<String, String> context) { - ice_ping(__context, true); + _iceI_ice_ping(context, true); } - private static final String __ice_ping_name = "ice_ping"; + private static final String _ice_ping_name = "ice_ping"; private void - ice_ping(java.util.Map<String, String> __context, boolean __explicitCtx) + _iceI_ice_ping(java.util.Map<String, String> context, boolean explicitCtx) { - end_ice_ping(begin_ice_ping(__context, __explicitCtx, true, null)); + end_ice_ping(_iceI_begin_ice_ping(context, explicitCtx, true, null)); } /** @@ -392,175 +392,175 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final AsyncResult begin_ice_ping() { - return begin_ice_ping(null, false, false, null); + return _iceI_begin_ice_ping(null, false, false, null); } /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(java.util.Map<String, String> __context) + begin_ice_ping(java.util.Map<String, String> context) { - return begin_ice_ping(__context, true, false, null); + return _iceI_begin_ice_ping(context, true, false, null); } /** * Tests whether the target object of this proxy can be reached. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(Callback __cb) + begin_ice_ping(Callback cb) { - return begin_ice_ping(null, false, false, __cb); + return _iceI_begin_ice_ping(null, false, false, cb); } /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(java.util.Map<String, String> __context, Callback __cb) + begin_ice_ping(java.util.Map<String, String> context, Callback cb) { - return begin_ice_ping(__context, true, false, __cb); + return _iceI_begin_ice_ping(context, true, false, cb); } /** * Tests whether the target object of this proxy can be reached. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(Callback_Object_ice_ping __cb) + begin_ice_ping(Callback_Object_ice_ping cb) { - return begin_ice_ping(null, false, false, __cb); + return _iceI_begin_ice_ping(null, false, false, cb); } /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(java.util.Map<String, String> __context, Callback_Object_ice_ping __cb) + begin_ice_ping(java.util.Map<String, String> context, Callback_Object_ice_ping cb) { - return begin_ice_ping(__context, true, false, __cb); + return _iceI_begin_ice_ping(context, true, false, cb); } /** * Tests whether the target object of this proxy can be reached. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_ping(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_ping(null, false, false, - new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, null)); + return _iceI_begin_ice_ping(null, false, false, + new IceInternal.Functional_OnewayCallback(responseCb, exceptionCb, null)); } /** * Tests whether the target object of this proxy can be reached. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_ping(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_ping(null, false, false, new IceInternal.Functional_OnewayCallback(__responseCb, - __exceptionCb, __sentCb)); + return _iceI_begin_ice_ping(null, false, false, new IceInternal.Functional_OnewayCallback(responseCb, + exceptionCb, sentCb)); } /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(java.util.Map<String, String> __context, - IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_ping(java.util.Map<String, String> context, + IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_ping(__context, true, false, new IceInternal.Functional_OnewayCallback(__responseCb, - __exceptionCb, null)); + return _iceI_begin_ice_ping(context, true, false, new IceInternal.Functional_OnewayCallback(responseCb, + exceptionCb, null)); } /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ping(java.util.Map<String, String> __context, - IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_ping(java.util.Map<String, String> context, + IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_ping(__context, true, false, - new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, __sentCb)); + return _iceI_begin_ice_ping(context, true, false, + new IceInternal.Functional_OnewayCallback(responseCb, exceptionCb, sentCb)); } - private AsyncResult begin_ice_ping(java.util.Map<String, String> __context, boolean __explicitCtx, - boolean __synchronous, IceInternal.CallbackBase __cb) + private AsyncResult _iceI_begin_ice_ping(java.util.Map<String, String> context, boolean explicitCtx, + boolean synchronous, IceInternal.CallbackBase cb) { - IceInternal.OutgoingAsync __result = getOutgoingAsync(__ice_ping_name, __cb); + IceInternal.OutgoingAsync result = getOutgoingAsync(_ice_ping_name, cb); try { - __result.prepare(__ice_ping_name, OperationMode.Nonmutating, __context, __explicitCtx, __synchronous); - __result.writeEmptyParams(); - __result.invoke(); + result.prepare(_ice_ping_name, OperationMode.Nonmutating, context, explicitCtx, synchronous); + result.writeEmptyParams(); + result.invoke(); } - catch(Exception __ex) + catch(Exception ex) { - __result.abort(__ex); + result.abort(ex); } - return __result; + return result; } /** * Completes the asynchronous ping request. * - * @param __result The asynchronous result. + * @param result The asynchronous result. **/ @Override public final void - end_ice_ping(AsyncResult __result) + end_ice_ping(AsyncResult result) { - __end(__result, __ice_ping_name); + _end(result, _ice_ping_name); } /** @@ -573,30 +573,30 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final String[] ice_ids() { - return ice_ids(null, false); + return _iceI_ice_ids(null, false); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The <code>Context</code> map for the invocation. + * @param context The <code>Context</code> map for the invocation. * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived * order. The first element of the returned array is always <code>::Ice::Object</code>. **/ @Override public final String[] - ice_ids(java.util.Map<String, String> __context) + ice_ids(java.util.Map<String, String> context) { - return ice_ids(__context, true); + return _iceI_ice_ids(context, true); } - private static final String __ice_ids_name = "ice_ids"; + private static final String _ice_ids_name = "ice_ids"; private String[] - ice_ids(java.util.Map<String, String> __context, boolean __explicitCtx) + _iceI_ice_ids(java.util.Map<String, String> context, boolean explicitCtx) { - __checkTwowayOnly(__ice_id_name); - return end_ice_ids(begin_ice_ids(__context, __explicitCtx, true, null)); + _checkTwowayOnly(_ice_id_name); + return end_ice_ids(_iceI_begin_ice_ids(context, explicitCtx, true, null)); } /** @@ -608,240 +608,240 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final AsyncResult begin_ice_ids() { - return begin_ice_ids(null, false, false, null); + return _iceI_begin_ice_ids(null, false, false, null); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(java.util.Map<String, String> __context) + begin_ice_ids(java.util.Map<String, String> context) { - return begin_ice_ids(__context, true, false, null); + return _iceI_begin_ice_ids(context, true, false, null); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(Callback __cb) + begin_ice_ids(Callback cb) { - return begin_ice_ids(null, false, false,__cb); + return _iceI_begin_ice_ids(null, false, false,cb); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(java.util.Map<String, String> __context, Callback __cb) + begin_ice_ids(java.util.Map<String, String> context, Callback cb) { - return begin_ice_ids(__context, true, false,__cb); + return _iceI_begin_ice_ids(context, true, false,cb); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(Callback_Object_ice_ids __cb) + begin_ice_ids(Callback_Object_ice_ids cb) { - return begin_ice_ids(null, false, false,__cb); + return _iceI_begin_ice_ids(null, false, false,cb); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(java.util.Map<String, String> __context, Callback_Object_ice_ids __cb) + begin_ice_ids(java.util.Map<String, String> context, Callback_Object_ice_ids cb) { - return begin_ice_ids(__context, true, false,__cb); + return _iceI_begin_ice_ids(context, true, false,cb); } private class FunctionalCallback_Object_ice_ids extends IceInternal.Functional_TwowayCallbackArg1<String[]> { - FunctionalCallback_Object_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + FunctionalCallback_Object_ice_ids(IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - super(__responseCb, __exceptionCb, __sentCb); + super(responseCb, exceptionCb, sentCb); } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_ids_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_ids_completed(this, result); } } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_ids(null, false, false, new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, - null)); + return _iceI_begin_ice_ids(null, false, false, new FunctionalCallback_Object_ice_ids(responseCb, exceptionCb, + null)); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_ids(null, false, false, new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, - __sentCb)); + return _iceI_begin_ice_ids(null, false, false, new FunctionalCallback_Object_ice_ids(responseCb, exceptionCb, + sentCb)); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_ids(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_ids(__context, true, false, new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, - null)); + return _iceI_begin_ice_ids(context, true, false, new FunctionalCallback_Object_ice_ids(responseCb, exceptionCb, + null)); } /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_ids(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String[]> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_ids(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String[]> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_ids(__context, true, false, - new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, __sentCb)); + return _iceI_begin_ice_ids(context, true, false, + new FunctionalCallback_Object_ice_ids(responseCb, exceptionCb, sentCb)); } - private AsyncResult begin_ice_ids(java.util.Map<String, String> __context, boolean __explicitCtx, - boolean __synchronous, IceInternal.CallbackBase __cb) + private AsyncResult _iceI_begin_ice_ids(java.util.Map<String, String> context, boolean explicitCtx, + boolean synchronous, IceInternal.CallbackBase cb) { - __checkAsyncTwowayOnly(__ice_ids_name); - IceInternal.OutgoingAsync __result = getOutgoingAsync(__ice_ids_name, __cb); + _checkAsyncTwowayOnly(_ice_ids_name); + IceInternal.OutgoingAsync result = getOutgoingAsync(_ice_ids_name, cb); try { - __result.prepare(__ice_ids_name, OperationMode.Nonmutating, __context, __explicitCtx, __synchronous); - __result.writeEmptyParams(); - __result.invoke(); + result.prepare(_ice_ids_name, OperationMode.Nonmutating, context, explicitCtx, synchronous); + result.writeEmptyParams(); + result.invoke(); } - catch(Exception __ex) + catch(Exception ex) { - __result.abort(__ex); + result.abort(ex); } - return __result; + return result; } /** * Completes the asynchronous ice_ids request. * - * @param __r The asynchronous result. + * @param r The asynchronous result. * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived * order. The first element of the returned array is always <code>::Ice::Object</code>. **/ @Override public final String[] - end_ice_ids(AsyncResult __r) + end_ice_ids(AsyncResult r) { - IceInternal.OutgoingAsync __result = IceInternal.OutgoingAsync.check(__r, this, __ice_ids_name); + IceInternal.OutgoingAsync result = IceInternal.OutgoingAsync.check(r, this, _ice_ids_name); try { - if(!__result.__wait()) + if(!result.waitForResponseOrUserEx()) { try { - __result.throwUserException(); + result.throwUserException(); } - catch(UserException __ex) + catch(UserException ex) { - throw new UnknownUserException(__ex.ice_id(), __ex); + throw new UnknownUserException(ex.ice_id(), ex); } } - String[] __ret = null; - InputStream __is = __result.startReadParams(); - __ret = StringSeqHelper.read(__is); - __result.endReadParams(); - return __ret; + String[] ret = null; + InputStream istr = result.startReadParams(); + ret = StringSeqHelper.read(istr); + result.endReadParams(); + return ret; } finally { - if(__result != null) + if(result != null) { - __result.cacheMessageBuffers(); + result.cacheMessageBuffers(); } } } - static public void __ice_ids_completed(TwowayCallbackArg1<String[]> __cb, AsyncResult __result) + static public void _iceI_ice_ids_completed(TwowayCallbackArg1<String[]> cb, AsyncResult result) { - String[] __ret = null; + String[] ret = null; try { - __ret = __result.getProxy().end_ice_ids(__result); + ret = result.getProxy().end_ice_ids(result); } - catch(LocalException __ex) + catch(LocalException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - catch(SystemException __ex) + catch(SystemException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - __cb.response(__ret); + cb.response(ret); } /** @@ -853,29 +853,29 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final String ice_id() { - return ice_id(null, false); + return _iceI_ice_id(null, false); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The <code>Context</code> map for the invocation. + * @param context The <code>Context</code> map for the invocation. * @return The Slice type ID of the most-derived interface. **/ @Override public final String - ice_id(java.util.Map<String, String> __context) + ice_id(java.util.Map<String, String> context) { - return ice_id(__context, true); + return _iceI_ice_id(context, true); } - private static final String __ice_id_name = "ice_id"; + private static final String _ice_id_name = "ice_id"; private String - ice_id(java.util.Map<String, String> __context, boolean __explicitCtx) + _iceI_ice_id(java.util.Map<String, String> context, boolean explicitCtx) { - __checkTwowayOnly(__ice_id_name); - return end_ice_id(begin_ice_id(__context, __explicitCtx, true, null)); + _checkTwowayOnly(_ice_id_name); + return end_ice_id(_iceI_begin_ice_id(context, explicitCtx, true, null)); } /** @@ -887,74 +887,74 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final AsyncResult begin_ice_id() { - return begin_ice_id(null, false, false, null); + return _iceI_begin_ice_id(null, false, false, null); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(java.util.Map<String, String> __context) + begin_ice_id(java.util.Map<String, String> context) { - return begin_ice_id(__context, true, false, null); + return _iceI_begin_ice_id(context, true, false, null); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(Callback __cb) + begin_ice_id(Callback cb) { - return begin_ice_id(null, false, false, __cb); + return _iceI_begin_ice_id(null, false, false, cb); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(java.util.Map<String, String> __context, Callback __cb) + begin_ice_id(java.util.Map<String, String> context, Callback cb) { - return begin_ice_id(__context, true, false, __cb); + return _iceI_begin_ice_id(context, true, false, cb); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(Callback_Object_ice_id __cb) + begin_ice_id(Callback_Object_ice_id cb) { - return begin_ice_id(null, false, false, __cb); + return _iceI_begin_ice_id(null, false, false, cb); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(java.util.Map<String, String> __context, Callback_Object_ice_id __cb) + begin_ice_id(java.util.Map<String, String> context, Callback_Object_ice_id cb) { - return begin_ice_id(__context, true, false, __cb); + return _iceI_begin_ice_id(context, true, false, cb); } private class FunctionalCallback_Object_ice_id extends IceInternal.Functional_TwowayCallbackArg1<String> @@ -967,156 +967,156 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_id_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_id_completed(this, result); } } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_id(IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_id(null, false, false, new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, null)); + return _iceI_begin_ice_id(null, false, false, new FunctionalCallback_Object_ice_id(responseCb, exceptionCb, null)); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_id(IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_id(null, false, false, new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, __sentCb)); + return _iceI_begin_ice_id(null, false, false, new FunctionalCallback_Object_ice_id(responseCb, exceptionCb, sentCb)); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_id(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_id(__context, true, false, new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, null)); + return _iceI_begin_ice_id(context, true, false, new FunctionalCallback_Object_ice_id(responseCb, exceptionCb, null)); } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. - * @param __responseCb The asynchronous response callback object. - * @param __exceptionCb The asynchronous exception callback object. - * @param __sentCb The asynchronous sent callback object. + * @param context The context map for the invocation. + * @param responseCb The asynchronous response callback object. + * @param exceptionCb The asynchronous exception callback object. + * @param sentCb The asynchronous sent callback object. * @return The asynchronous result object. **/ @Override public final AsyncResult - begin_ice_id(java.util.Map<String, String> __context, - IceInternal.Functional_GenericCallback1<String> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_id(java.util.Map<String, String> context, + IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_id(__context, true, false, - new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, __sentCb)); + return _iceI_begin_ice_id(context, true, false, + new FunctionalCallback_Object_ice_id(responseCb, exceptionCb, sentCb)); } - private AsyncResult begin_ice_id(java.util.Map<String, String> __context, boolean __explicitCtx, - boolean __synchronous, IceInternal.CallbackBase __cb) + private AsyncResult _iceI_begin_ice_id(java.util.Map<String, String> context, boolean explicitCtx, + boolean synchronous, IceInternal.CallbackBase cb) { - __checkAsyncTwowayOnly(__ice_id_name); - IceInternal.OutgoingAsync __result = getOutgoingAsync(__ice_id_name, __cb); + _checkAsyncTwowayOnly(_ice_id_name); + IceInternal.OutgoingAsync result = getOutgoingAsync(_ice_id_name, cb); try { - __result.prepare(__ice_id_name, OperationMode.Nonmutating, __context, __explicitCtx, __synchronous); - __result.writeEmptyParams(); - __result.invoke(); + result.prepare(_ice_id_name, OperationMode.Nonmutating, context, explicitCtx, synchronous); + result.writeEmptyParams(); + result.invoke(); } - catch(Exception __ex) + catch(Exception ex) { - __result.abort(__ex); + result.abort(ex); } - return __result; + return result; } /** * Completes the asynchronous ice_id request. * - * @param __r The asynchronous result. + * @param r The asynchronous result. * @return The Slice type ID of the most-derived interface. **/ @Override public final String - end_ice_id(AsyncResult __r) + end_ice_id(AsyncResult r) { - IceInternal.OutgoingAsync __result = IceInternal.OutgoingAsync.check(__r, this, __ice_id_name); + IceInternal.OutgoingAsync result = IceInternal.OutgoingAsync.check(r, this, _ice_id_name); try { - if(!__result.__wait()) + if(!result.waitForResponseOrUserEx()) { try { - __result.throwUserException(); + result.throwUserException(); } - catch(UserException __ex) + catch(UserException ex) { - throw new UnknownUserException(__ex.ice_id(), __ex); + throw new UnknownUserException(ex.ice_id(), ex); } } - String __ret = null; - InputStream __is = __result.startReadParams(); - __ret = __is.readString(); - __result.endReadParams(); - return __ret; + String ret = null; + InputStream istr = result.startReadParams(); + ret = istr.readString(); + result.endReadParams(); + return ret; } finally { - if(__result != null) + if(result != null) { - __result.cacheMessageBuffers(); + result.cacheMessageBuffers(); } } } - static public void __ice_id_completed(TwowayCallbackArg1<String> __cb, AsyncResult __result) + static public void _iceI_ice_id_completed(TwowayCallbackArg1<String> cb, AsyncResult result) { - String __ret = null; + String ret = null; try { - __ret = __result.getProxy().end_ice_id(__result); + ret = result.getProxy().end_ice_id(result); } - catch(LocalException __ex) + catch(LocalException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - catch(SystemException __ex) + catch(SystemException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - __cb.response(__ret); + cb.response(ret); } /** @@ -1140,7 +1140,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final boolean ice_invoke(String operation, OperationMode mode, byte[] inParams, ByteSeqHolder outParams) { - return ice_invoke(operation, mode, inParams, outParams, null, false); + return _iceI_ice_invoke(operation, mode, inParams, outParams, null, false); } /** @@ -1164,17 +1164,17 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable ice_invoke(String operation, OperationMode mode, byte[] inParams, ByteSeqHolder outParams, java.util.Map<String, String> context) { - return ice_invoke(operation, mode, inParams, outParams, context, true); + return _iceI_ice_invoke(operation, mode, inParams, outParams, context, true); } private boolean - ice_invoke(String operation, OperationMode mode, byte[] inParams, ByteSeqHolder outParams, - java.util.Map<String, String> context, boolean explicitCtx) + _iceI_ice_invoke(String operation, OperationMode mode, byte[] inParams, ByteSeqHolder outParams, + java.util.Map<String, String> context, boolean explicitCtx) { - return end_ice_invoke(outParams, begin_ice_invoke(operation, mode, inParams, context, explicitCtx, true, null)); + return end_ice_invoke(outParams, _iceI_begin_ice_invoke(operation, mode, inParams, context, explicitCtx, true, null)); } - private static final String __ice_invoke_name = "ice_invoke"; + private static final String _ice_invoke_name = "ice_invoke"; /** * Invokes an operation dynamically and asynchronously. @@ -1191,7 +1191,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams) { - return begin_ice_invoke(operation, mode, inParams, null, false, false, null); + return _iceI_begin_ice_invoke(operation, mode, inParams, null, false, false, null); } /** @@ -1201,7 +1201,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The asynchronous result object. * * @see Blobject @@ -1210,9 +1210,9 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable @Override public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context) + java.util.Map<String, String> context) { - return begin_ice_invoke(operation, mode, inParams, __context, true, false, null); + return _iceI_begin_ice_invoke(operation, mode, inParams, context, true, false, null); } /** @@ -1222,7 +1222,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject @@ -1230,9 +1230,9 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult - begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, Callback __cb) + begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, Callback cb) { - return begin_ice_invoke(operation, mode, inParams, null, false, false, __cb); + return _iceI_begin_ice_invoke(operation, mode, inParams, null, false, false, cb); } /** @@ -1242,8 +1242,8 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject @@ -1251,10 +1251,10 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult - begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> __context, - Callback __cb) + begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> context, + Callback cb) { - return begin_ice_invoke(operation, mode, inParams, __context, true, false, __cb); + return _iceI_begin_ice_invoke(operation, mode, inParams, context, true, false, cb); } /** @@ -1264,7 +1264,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __cb The asynchronous callback object. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject @@ -1272,9 +1272,9 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult - begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, Callback_Object_ice_invoke __cb) + begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, Callback_Object_ice_invoke cb) { - return begin_ice_invoke(operation, mode, inParams, null, false, false, __cb); + return _iceI_begin_ice_invoke(operation, mode, inParams, null, false, false, cb); } /** @@ -1284,8 +1284,8 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. - * @param __cb The asynchronous callback object. + * @param context The context map for the invocation. + * @param cb The asynchronous callback object. * @return The asynchronous result object. * * @see Blobject @@ -1293,10 +1293,10 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult - begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> __context, - Callback_Object_ice_invoke __cb) + begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> context, + Callback_Object_ice_invoke cb) { - return begin_ice_invoke(operation, mode, inParams, __context, true, false, __cb); + return _iceI_begin_ice_invoke(operation, mode, inParams, context, true, false, cb); } /** @@ -1316,11 +1316,11 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - FunctionalCallback_Object_ice_invoke_Response responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, - IceInternal.Functional_BoolCallback sentCb) + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_invoke(operation, mode, inParams, null, false, false, responseCb, exceptionCb, sentCb); + return _iceI_begin_ice_invoke(operation, mode, inParams, null, false, false, responseCb, exceptionCb, sentCb); } /** @@ -1339,10 +1339,10 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - FunctionalCallback_Object_ice_invoke_Response responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_invoke(operation, mode, inParams, null, false, false, responseCb, exceptionCb, null); + return _iceI_begin_ice_invoke(operation, mode, inParams, null, false, false, responseCb, exceptionCb, null); } /** @@ -1363,12 +1363,12 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> context, - FunctionalCallback_Object_ice_invoke_Response responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, - IceInternal.Functional_BoolCallback sentCb) + java.util.Map<String, String> context, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_invoke(operation, mode, inParams, context, true, false, responseCb, exceptionCb, sentCb); + return _iceI_begin_ice_invoke(operation, mode, inParams, context, true, false, responseCb, exceptionCb, sentCb); } /** @@ -1388,20 +1388,20 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> context, - FunctionalCallback_Object_ice_invoke_Response responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) + java.util.Map<String, String> context, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_invoke(operation, mode, inParams, context, true, false, responseCb, exceptionCb, null); + return _iceI_begin_ice_invoke(operation, mode, inParams, context, true, false, responseCb, exceptionCb, null); } - private AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context, - boolean __explicitCtx, - boolean __synchronous, - FunctionalCallback_Object_ice_invoke_Response __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + private AsyncResult _iceI_begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + java.util.Map<String, String> context, + boolean explicitCtx, + boolean synchronous, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { class CB extends IceInternal.Functional_TwowayCallback implements _Callback_Object_ice_invoke { @@ -1410,50 +1410,50 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable IceInternal.Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } @Override - public void response(boolean __ret, byte[] outParams) + public void response(boolean ret, byte[] outParams) { - __responseCb.apply(__ret, outParams); + _responseCb.apply(ret, outParams); } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_invoke_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_invoke_completed(this, result); } - FunctionalCallback_Object_ice_invoke_Response __responseCb; + FunctionalCallback_Object_ice_invoke_Response _responseCb; } - return begin_ice_invoke(operation, mode, inParams, __context, __explicitCtx, __synchronous, - new CB(__responseCb, __exceptionCb, __sentCb)); + return _iceI_begin_ice_invoke(operation, mode, inParams, context, explicitCtx, synchronous, + new CB(responseCb, exceptionCb, sentCb)); } private AsyncResult - begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> __context, - boolean __explicitCtx, boolean __synchronous, IceInternal.CallbackBase __cb) + _iceI_begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> context, + boolean explicitCtx, boolean synchronous, IceInternal.CallbackBase cb) { - IceInternal.OutgoingAsync __result = getOutgoingAsync(__ice_invoke_name, __cb); + IceInternal.OutgoingAsync result = getOutgoingAsync(_ice_invoke_name, cb); try { - __result.prepare(operation, mode, __context, __explicitCtx, __synchronous); - __result.writeParamEncaps(inParams); - __result.invoke(); + result.prepare(operation, mode, context, explicitCtx, synchronous); + result.writeParamEncaps(inParams); + result.invoke(); } - catch(Exception __ex) + catch(Exception ex) { - __result.abort(__ex); + result.abort(ex); } - return __result; + return result; } /** * Completes the asynchronous ice_invoke request. * * @param outParams The encoded out-paramaters and return value. - * @param __r The asynchronous result. + * @param r The asynchronous result. * @return If the operation completed successfully, the return value * is <code>true</code>. If the operation raises a user exception, * the return value is <code>false</code>; in this case, <code>outParams</code> @@ -1462,49 +1462,49 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final boolean - end_ice_invoke(ByteSeqHolder outParams, AsyncResult __r) + end_ice_invoke(ByteSeqHolder outParams, AsyncResult r) { - IceInternal.OutgoingAsync __result = IceInternal.OutgoingAsync.check(__r, this, __ice_invoke_name); + IceInternal.OutgoingAsync result = IceInternal.OutgoingAsync.check(r, this, _ice_invoke_name); try { - boolean ok = __result.__wait(); + boolean ok = result.waitForResponseOrUserEx(); if(_reference.getMode() == IceInternal.Reference.ModeTwoway) { if(outParams != null) { - outParams.value = __result.readParamEncaps(); + outParams.value = result.readParamEncaps(); } } return ok; } finally { - if(__result != null) + if(result != null) { - __result.cacheMessageBuffers(); + result.cacheMessageBuffers(); } } } - public static void __ice_invoke_completed(_Callback_Object_ice_invoke __cb, AsyncResult __result) + public static void _iceI_ice_invoke_completed(_Callback_Object_ice_invoke cb, AsyncResult result) { ByteSeqHolder outParams = new ByteSeqHolder(); - boolean __ret = false; + boolean ret = false; try { - __ret = __result.getProxy().end_ice_invoke(outParams, __result); + ret = result.getProxy().end_ice_invoke(outParams, result); } - catch(LocalException __ex) + catch(LocalException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - catch(SystemException __ex) + catch(SystemException ex) { - __cb.exception(__ex); + cb.exception(ex); return; } - __cb.response(__ret, outParams.value); + cb.response(ret, outParams.value); } /** @@ -1540,7 +1540,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable else { ObjectPrxHelperBase proxy = new ObjectPrxHelperBase(); - proxy.__setup(_reference.changeIdentity(newIdentity)); + proxy._setup(_reference.changeIdentity(newIdentity)); return proxy; } } @@ -1553,7 +1553,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable **/ @Override public final java.util.Map<String, String> - ice_getContext() + ice_getContext() { return new java.util.HashMap<String, String>(_reference.getContext()); } @@ -1605,7 +1605,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable else { ObjectPrxHelperBase proxy = new ObjectPrxHelperBase(); - proxy.__setup(_reference.changeFacet(newFacet)); + proxy._setup(_reference.changeFacet(newFacet)); return proxy; } } @@ -2285,75 +2285,75 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public AsyncResult begin_ice_getConnection() { - return begin_ice_getConnectionInternal(null); + return _iceI_begin_ice_getConnectionInternal(null); } /** * Asynchronously gets the connection for this proxy. The call does not block. * - * @param __cb The callback object to notify the application when the flush is complete. + * @param cb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ @Override public AsyncResult - begin_ice_getConnection(Callback __cb) + begin_ice_getConnection(Callback cb) { - return begin_ice_getConnectionInternal(__cb); + return _iceI_begin_ice_getConnectionInternal(cb); } /** * Asynchronously gets the connection for this proxy. The call does not block. * - * @param __cb The callback object to notify the application when the flush is complete. + * @param cb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ @Override public AsyncResult - begin_ice_getConnection(Callback_Object_ice_getConnection __cb) + begin_ice_getConnection(Callback_Object_ice_getConnection cb) { - return begin_ice_getConnectionInternal(__cb); + return _iceI_begin_ice_getConnectionInternal(cb); } private class FunctionalCallback_Object_ice_getConnection extends IceInternal.Functional_TwowayCallbackArg1<Ice.Connection> { FunctionalCallback_Object_ice_getConnection( - IceInternal.Functional_GenericCallback1<Ice.Connection> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + IceInternal.Functional_GenericCallback1<Ice.Connection> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - super(__responseCb, __exceptionCb, null); + super(responseCb, exceptionCb, null); } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { - ObjectPrxHelperBase.__ice_getConnection_completed(this, __result); + ObjectPrxHelperBase._iceI_ice_getConnection_completed(this, result); } } /** * Asynchronously gets the connection for this proxy. The call does not block. * - * @param __responseCb The callback object to notify the application when the there is a response available. - * @param __exceptionCb The callback object to notify the application when the there is an exception getting + * @param responseCb The callback object to notify the application when the there is a response available. + * @param exceptionCb The callback object to notify the application when the there is an exception getting * connection. * @return The asynchronous result object. **/ @Override public AsyncResult - begin_ice_getConnection(IceInternal.Functional_GenericCallback1<Ice.Connection> __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb) + begin_ice_getConnection(IceInternal.Functional_GenericCallback1<Ice.Connection> responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb) { - return begin_ice_getConnectionInternal( - new FunctionalCallback_Object_ice_getConnection(__responseCb, __exceptionCb)); + return _iceI_begin_ice_getConnectionInternal( + new FunctionalCallback_Object_ice_getConnection(responseCb, exceptionCb)); } - private static final String __ice_getConnection_name = "ice_getConnection"; + private static final String _ice_getConnection_name = "ice_getConnection"; private AsyncResult - begin_ice_getConnectionInternal(IceInternal.CallbackBase cb) + _iceI_begin_ice_getConnectionInternal(IceInternal.CallbackBase cb) { - IceInternal.ProxyGetConnection result = new IceInternal.ProxyGetConnection(this, __ice_getConnection_name, cb); + IceInternal.ProxyGetConnection result = new IceInternal.ProxyGetConnection(this, _ice_getConnection_name, cb); try { result.invoke(); @@ -2369,12 +2369,12 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public Ice.Connection end_ice_getConnection(AsyncResult r) { - IceInternal.ProxyGetConnection result = IceInternal.ProxyGetConnection.check(r, this, __ice_getConnection_name); - result.__wait(); + IceInternal.ProxyGetConnection result = IceInternal.ProxyGetConnection.check(r, this, _ice_getConnection_name); + result.waitForResponseOrUserEx(); return result.getConnection(); } - static public void __ice_getConnection_completed(TwowayCallbackArg1<Ice.Connection> cb, AsyncResult result) + static public void _iceI_ice_getConnection_completed(TwowayCallbackArg1<Ice.Connection> cb, AsyncResult result) { Ice.Connection ret = null; try @@ -2447,59 +2447,59 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public AsyncResult begin_ice_flushBatchRequests() { - return begin_ice_flushBatchRequestsInternal(null); + return _iceI_begin_ice_flushBatchRequestsInternal(null); } /** * Asynchronously flushes any pending batched requests for this communicator. The call does not block. * - * @param __cb The callback object to notify the application when the flush is complete. + * @param cb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ @Override public AsyncResult - begin_ice_flushBatchRequests(Callback __cb) + begin_ice_flushBatchRequests(Callback cb) { - return begin_ice_flushBatchRequestsInternal(__cb); + return _iceI_begin_ice_flushBatchRequestsInternal(cb); } /** * Asynchronously flushes any pending batched requests for this communicator. The call does not block. * - * @param __cb The callback object to notify the application when the flush is complete. + * @param cb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ @Override public AsyncResult - begin_ice_flushBatchRequests(Callback_Object_ice_flushBatchRequests __cb) + begin_ice_flushBatchRequests(Callback_Object_ice_flushBatchRequests cb) { - return begin_ice_flushBatchRequestsInternal(__cb); + return _iceI_begin_ice_flushBatchRequestsInternal(cb); } /** * Asynchronously flushes any pending batched requests for this communicator. The call does not block. * - * @param __exceptionCb The callback object to notify the application when the there is an exception flushing + * @param exceptionCb The callback object to notify the application when the there is an exception flushing * the requests. - * @param __sentCb The callback object to notify the application when the flush is complete. + * @param sentCb The callback object to notify the application when the flush is complete. * @return The asynchronous result object. **/ @Override public AsyncResult - begin_ice_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, - IceInternal.Functional_GenericCallback1<Ice.Exception> __exceptionCb, - IceInternal.Functional_BoolCallback __sentCb) + begin_ice_flushBatchRequests(IceInternal.Functional_VoidCallback responseCb, + IceInternal.Functional_GenericCallback1<Ice.Exception> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) { - return begin_ice_flushBatchRequestsInternal( - new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, __sentCb)); + return _iceI_begin_ice_flushBatchRequestsInternal( + new IceInternal.Functional_OnewayCallback(responseCb, exceptionCb, sentCb)); } - private static final String __ice_flushBatchRequests_name = "ice_flushBatchRequests"; + private static final String _ice_flushBatchRequests_name = "ice_flushBatchRequests"; private AsyncResult - begin_ice_flushBatchRequestsInternal(IceInternal.CallbackBase cb) + _iceI_begin_ice_flushBatchRequestsInternal(IceInternal.CallbackBase cb) { - IceInternal.ProxyFlushBatch result = new IceInternal.ProxyFlushBatch(this, __ice_flushBatchRequests_name, cb); + IceInternal.ProxyFlushBatch result = new IceInternal.ProxyFlushBatch(this, _ice_flushBatchRequests_name, cb); try { result.invoke(); @@ -2515,8 +2515,8 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable public void end_ice_flushBatchRequests(AsyncResult r) { - IceInternal.ProxyFlushBatch result = IceInternal.ProxyFlushBatch.check(r, this, __ice_flushBatchRequests_name); - result.__wait(); + IceInternal.ProxyFlushBatch result = IceInternal.ProxyFlushBatch.check(r, this, _ice_flushBatchRequests_name); + result.waitForResponseOrUserEx(); } /** @@ -2543,20 +2543,20 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable return false; } - public void __write(OutputStream os) + public void _write(OutputStream os) { - _reference.getIdentity().__write(os); + _reference.getIdentity().write(os); _reference.streamWrite(os); } public final IceInternal.Reference - __reference() + _getReference() { return _reference; } public final void - __copyFrom(ObjectPrx from) + _copyFrom(ObjectPrx from) { synchronized(from) { @@ -2567,10 +2567,10 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public final int - __handleException(Exception ex, IceInternal.RequestHandler handler, OperationMode mode, boolean sent, - Holder<Integer> interval, int cnt) + _handleException(Exception ex, IceInternal.RequestHandler handler, OperationMode mode, boolean sent, + Holder<Integer> interval, int cnt) { - __updateRequestHandler(handler, null); // Clear the request handler + _updateRequestHandler(handler, null); // Clear the request handler // // We only retry local exception, system exceptions aren't retried. @@ -2614,7 +2614,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public final void - __checkTwowayOnly(String name) + _checkTwowayOnly(String name) { // // No mutex lock necessary, there is nothing mutable in this @@ -2630,7 +2630,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public final void - __checkAsyncTwowayOnly(String name) + _checkAsyncTwowayOnly(String name) { // // No mutex lock necessary, there is nothing mutable in this @@ -2644,12 +2644,12 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public final void - __end(AsyncResult r, String operation) + _end(AsyncResult r, String operation) { IceInternal.ProxyOutgoingAsyncBase result = IceInternal.ProxyOutgoingAsyncBase.check(r, this, operation); try { - boolean ok = result.__wait(); + boolean ok = result.waitForResponseOrUserEx(); if(_reference.getMode() == IceInternal.Reference.ModeTwoway) { IceInternal.OutgoingAsync outAsync = (IceInternal.OutgoingAsync)result; @@ -2677,7 +2677,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public final IceInternal.RequestHandler - __getRequestHandler() + _getRequestHandler() { if(_reference.getCacheConnection()) { @@ -2693,7 +2693,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } synchronized public final IceInternal.BatchRequestQueue - __getBatchRequestQueue() + _getBatchRequestQueue() { if(_batchRequestQueue == null) { @@ -2703,7 +2703,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public IceInternal.RequestHandler - __setRequestHandler(IceInternal.RequestHandler handler) + _setRequestHandler(IceInternal.RequestHandler handler) { if(_reference.getCacheConnection()) { @@ -2720,7 +2720,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } public void - __updateRequestHandler(IceInternal.RequestHandler previous, IceInternal.RequestHandler handler) + _updateRequestHandler(IceInternal.RequestHandler previous, IceInternal.RequestHandler handler) { if(_reference.getCacheConnection() && previous != null) { @@ -2758,7 +2758,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable // Only for use by IceInternal.ProxyFactory // public final void - __setup(IceInternal.Reference ref) + _setup(IceInternal.Reference ref) { // // No need to synchronize, as this operation is only called @@ -2829,7 +2829,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable { throw new SyscallException(ex); } - h.__copyFrom(obj); + h._copyFrom(obj); d = proxyCls.cast(h); } } @@ -2862,7 +2862,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable if(explicitFacet) { ObjectPrxHelperBase h = ObjectPrxHelperBase.class.cast(helperCls.newInstance()); - h.__copyFrom(obj.ice_facet(facet)); + h._copyFrom(obj.ice_facet(facet)); d = proxyCls.cast(h); } else @@ -2874,7 +2874,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable else { ObjectPrxHelperBase h = ObjectPrxHelperBase.class.cast(helperCls.newInstance()); - h.__copyFrom(obj); + h._copyFrom(obj); d = proxyCls.cast(h); } } @@ -2921,7 +2921,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable try { ObjectPrxHelperBase proxy = getClass().newInstance(); - proxy.__setup(ref); + proxy._setup(ref); return proxy; } catch(InstantiationException e) @@ -2951,7 +2951,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable private void readObject(java.io.ObjectInputStream in) - throws java.io.IOException, ClassNotFoundException + throws java.io.IOException, ClassNotFoundException { String s = in.readUTF(); try diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectReader.java b/java-compat/src/Ice/src/main/java/Ice/ObjectReader.java index 488986f98af..ba4e52e633e 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectReader.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectReader.java @@ -22,13 +22,13 @@ public abstract class ObjectReader extends ObjectImpl public abstract void read(InputStream in); @Override - public void __write(OutputStream os) + public void _iceWrite(OutputStream os) { assert(false); } @Override - public void __read(InputStream is) + public void _iceRead(InputStream is) { read(is); } diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectWriter.java b/java-compat/src/Ice/src/main/java/Ice/ObjectWriter.java index 91e474477a7..9ef741bafc1 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ObjectWriter.java +++ b/java-compat/src/Ice/src/main/java/Ice/ObjectWriter.java @@ -22,13 +22,13 @@ public abstract class ObjectWriter extends ObjectImpl public abstract void write(OutputStream out); @Override - public void __write(OutputStream os) + public void _iceWrite(OutputStream os) { write(os); } @Override - public void __read(Ice.InputStream is) + public void _iceRead(Ice.InputStream is) { assert(false); } diff --git a/java-compat/src/Ice/src/main/java/Ice/OnewayCallback.java b/java-compat/src/Ice/src/main/java/Ice/OnewayCallback.java index fd033d31500..dabf75a7aa7 100644 --- a/java-compat/src/Ice/src/main/java/Ice/OnewayCallback.java +++ b/java-compat/src/Ice/src/main/java/Ice/OnewayCallback.java @@ -46,32 +46,32 @@ public abstract class OnewayCallback extends IceInternal.CallbackBase } @Override - public final void __sent(AsyncResult __result) + public final void _iceSent(AsyncResult result) { - sent(__result.sentSynchronously()); + sent(result.sentSynchronously()); } @Override - public final boolean __hasSentCallback() + public final boolean _iceHasSentCallback() { return true; } @Override - public final void __completed(AsyncResult __result) + public final void _iceCompleted(AsyncResult result) { try { - ((ObjectPrxHelperBase)__result.getProxy()).__end(__result, __result.getOperation()); + ((ObjectPrxHelperBase)result.getProxy())._end(result, result.getOperation()); } - catch(LocalException __ex) + catch(LocalException ex) { - exception(__ex); + exception(ex); return; } - catch(SystemException __ex) + catch(SystemException ex) { - exception(__ex); + exception(ex); return; } response(); diff --git a/java-compat/src/Ice/src/main/java/Ice/OutputStream.java b/java-compat/src/Ice/src/main/java/Ice/OutputStream.java index ce2fe70f223..3b5df79e17e 100644 --- a/java-compat/src/Ice/src/main/java/Ice/OutputStream.java +++ b/java-compat/src/Ice/src/main/java/Ice/OutputStream.java @@ -386,7 +386,7 @@ public class OutputStream _encapsStack.start = _buf.size(); writeInt(0); // Placeholder for the encapsulation length. - _encapsStack.encoding.__write(this); + _encapsStack.encoding.write(this); } /** @@ -417,7 +417,7 @@ public class OutputStream { IceInternal.Protocol.checkSupportedEncoding(encoding); writeInt(6); // Size - encoding.__write(this); + encoding.write(this); } /** @@ -1573,12 +1573,12 @@ public class OutputStream { if(v != null) { - v.__write(this); + v._write(this); } else { Identity ident = new Identity(); - ident.__write(this); + ident.write(this); } } @@ -1866,9 +1866,9 @@ public class OutputStream // This allows reading the pending instances even if some part of // the exception was sliced. // - boolean usesClasses = v.__usesClasses(); + boolean usesClasses = v._usesClasses(); _stream.writeBool(usesClasses); - v.__write(_stream); + v._write(_stream); if(usesClasses) { writePendingValues(); @@ -1973,7 +1973,7 @@ public class OutputStream _stream.instance().initializationData().logger.warning(s); } - p.getKey().__write(_stream); + p.getKey()._iceWrite(_stream); } } _stream.writeSize(0); // Zero marker indicates end of sequence of sequences of instances. @@ -2073,7 +2073,7 @@ public class OutputStream @Override void writeException(UserException v) { - v.__write(_stream); + v._write(_stream); } @Override @@ -2320,7 +2320,7 @@ public class OutputStream } _stream.writeSize(1); // Class instance marker. - v.__write(_stream); + v._iceWrite(_stream); } private static final class InstanceData diff --git a/java-compat/src/Ice/src/main/java/Ice/TwowayCallback.java b/java-compat/src/Ice/src/main/java/Ice/TwowayCallback.java index bedbe2970c6..82cae9ef918 100644 --- a/java-compat/src/Ice/src/main/java/Ice/TwowayCallback.java +++ b/java-compat/src/Ice/src/main/java/Ice/TwowayCallback.java @@ -17,14 +17,14 @@ public interface TwowayCallback /** * Called when the invocation raises an Ice run-time exception. * - * @param __ex The Ice run-time exception raised by the operation. + * @param ex The Ice run-time exception raised by the operation. **/ - public void exception(LocalException __ex); + public void exception(LocalException ex); /** * Called when the invocation raises an Ice system exception. * - * @param __ex The Ice system exception raised by the operation. + * @param ex The Ice system exception raised by the operation. **/ - public void exception(SystemException __ex); + public void exception(SystemException ex); } diff --git a/java-compat/src/Ice/src/main/java/Ice/TwowayCallbackUE.java b/java-compat/src/Ice/src/main/java/Ice/TwowayCallbackUE.java index ecd25e75edb..d43c28c54eb 100644 --- a/java-compat/src/Ice/src/main/java/Ice/TwowayCallbackUE.java +++ b/java-compat/src/Ice/src/main/java/Ice/TwowayCallbackUE.java @@ -11,5 +11,5 @@ package Ice; public interface TwowayCallbackUE extends TwowayCallback { - public void exception(UserException __ex); + public void exception(UserException ex); } diff --git a/java-compat/src/Ice/src/main/java/Ice/UnknownSlicedValue.java b/java-compat/src/Ice/src/main/java/Ice/UnknownSlicedValue.java index 98d3d45260c..d61409e6f33 100644 --- a/java-compat/src/Ice/src/main/java/Ice/UnknownSlicedValue.java +++ b/java-compat/src/Ice/src/main/java/Ice/UnknownSlicedValue.java @@ -36,17 +36,17 @@ public final class UnknownSlicedValue extends ObjectImpl } @Override - public void __write(OutputStream __os) + public void _iceWrite(OutputStream ostr) { - __os.startValue(_slicedData); - __os.endValue(); + ostr.startValue(_slicedData); + ostr.endValue(); } @Override - public void __read(InputStream __is) + public void _iceRead(InputStream istr) { - __is.startValue(); - _slicedData = __is.endValue(true); + istr.startValue(); + _slicedData = istr.endValue(true); } private final String _unknownTypeId; diff --git a/java-compat/src/Ice/src/main/java/Ice/UserException.java b/java-compat/src/Ice/src/main/java/Ice/UserException.java index 1d78d42c722..6ac02e2ad54 100644 --- a/java-compat/src/Ice/src/main/java/Ice/UserException.java +++ b/java-compat/src/Ice/src/main/java/Ice/UserException.java @@ -87,30 +87,30 @@ public abstract class UserException extends java.lang.Exception implements Clone } public void - __write(OutputStream os) + _write(OutputStream os) { os.startException(null); - __writeImpl(os); + _writeImpl(os); os.endException(); } public void - __read(InputStream is) + _read(InputStream is) { is.startException(); - __readImpl(is); + _readImpl(is); is.endException(false); } public boolean - __usesClasses() + _usesClasses() { return false; } protected abstract void - __writeImpl(OutputStream os); + _writeImpl(OutputStream os); protected abstract void - __readImpl(InputStream is); + _readImpl(InputStream is); } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/AsyncResultI.java b/java-compat/src/Ice/src/main/java/IceInternal/AsyncResultI.java index 41f49774a0e..605f17faaf1 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/AsyncResultI.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/AsyncResultI.java @@ -139,7 +139,7 @@ public class AsyncResultI implements AsyncResult try { - _callback.__sent(this); + _callback._iceSent(this); } catch(java.lang.RuntimeException ex) { @@ -183,7 +183,7 @@ public class AsyncResultI implements AsyncResult try { - _callback.__completed(this); + _callback._iceCompleted(this); } catch(RuntimeException ex) { @@ -244,7 +244,7 @@ public class AsyncResultI implements AsyncResult _cancellationHandler = handler; } - public final boolean __wait() + public final boolean waitForResponseOrUserEx() { try { @@ -308,7 +308,7 @@ public class AsyncResultI implements AsyncResult { _state |= StateDone | StateOK; _cancellationHandler = null; - if(_observer != null && (_callback == null || !_callback.__hasSentCallback())) + if(_observer != null && (_callback == null || !_callback._iceHasSentCallback())) { _observer.detach(); _observer = null; @@ -324,7 +324,7 @@ public class AsyncResultI implements AsyncResult cacheMessageBuffers(); } this.notifyAll(); - return !alreadySent && _callback != null && _callback.__hasSentCallback(); + return !alreadySent && _callback != null && _callback._iceHasSentCallback(); } } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/CallbackBase.java b/java-compat/src/Ice/src/main/java/IceInternal/CallbackBase.java index b482e9a71cd..b45a1179ca8 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/CallbackBase.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/CallbackBase.java @@ -11,9 +11,9 @@ package IceInternal; public abstract class CallbackBase { - public abstract void __completed(Ice.AsyncResult r); - public abstract void __sent(Ice.AsyncResult r); - public abstract boolean __hasSentCallback(); + public abstract void _iceCompleted(Ice.AsyncResult r); + public abstract void _iceSent(Ice.AsyncResult r); + public abstract boolean _iceHasSentCallback(); public static void check(boolean cb) { diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java b/java-compat/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java index 4f50988102a..9accb698840 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java @@ -345,7 +345,7 @@ public class ConnectRequestHandler } for(Ice.ObjectPrxHelperBase proxy : _proxies) { - proxy.__updateRequestHandler(previous, _requestHandler); + proxy._updateRequestHandler(previous, _requestHandler); } } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java b/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java index 6ae5fe1b4c2..ed8532e8d12 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java @@ -277,7 +277,7 @@ public class FixedReference extends Reference { handler = new QueueRequestHandler(getInstance(), handler); } - return proxy.__setRequestHandler(handler); + return proxy._setRequestHandler(handler); } @Override diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_CallbackBase.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_CallbackBase.java index dc200518c10..21c314da5b6 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_CallbackBase.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_CallbackBase.java @@ -16,35 +16,35 @@ public abstract class Functional_CallbackBase extends IceInternal.CallbackBase Functional_BoolCallback sentCb) { CallbackBase.check(responseCb || exceptionCb != null); - __exceptionCb = exceptionCb; - __sentCb = sentCb; + _exceptionCb = exceptionCb; + _sentCb = sentCb; } protected Functional_CallbackBase(Functional_GenericCallback1<Ice.Exception> exceptionCb, Functional_BoolCallback sentCb) { - __exceptionCb = exceptionCb; - __sentCb = sentCb; + _exceptionCb = exceptionCb; + _sentCb = sentCb; } @Override - public final void __sent(Ice.AsyncResult __result) + public final void _iceSent(Ice.AsyncResult result) { - if(__sentCb != null) + if(_sentCb != null) { - __sentCb.apply(__result.sentSynchronously()); + _sentCb.apply(result.sentSynchronously()); } } @Override - public final boolean __hasSentCallback() + public final boolean _iceHasSentCallback() { - return __sentCb != null; + return _sentCb != null; } @Override - public abstract void __completed(Ice.AsyncResult __result); + public abstract void _iceCompleted(Ice.AsyncResult result); - protected final Functional_GenericCallback1<Ice.Exception> __exceptionCb; - protected final Functional_BoolCallback __sentCb; + protected final Functional_GenericCallback1<Ice.Exception> _exceptionCb; + protected final Functional_BoolCallback _sentCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_OnewayCallback.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_OnewayCallback.java index 7962cd4e336..48828a6a244 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_OnewayCallback.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_OnewayCallback.java @@ -17,28 +17,28 @@ public class Functional_OnewayCallback extends IceInternal.Functional_CallbackBa { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || exceptionCb != null); - __responseCb = responseCb; + _responseCb = responseCb; } @Override - public final void __completed(Ice.AsyncResult __result) + public final void _iceCompleted(Ice.AsyncResult result) { try { - ((Ice.ObjectPrxHelperBase)__result.getProxy()).__end(__result, __result.getOperation()); - if(__responseCb != null) + ((Ice.ObjectPrxHelperBase)result.getProxy())._end(result, result.getOperation()); + if(_responseCb != null) { - __responseCb.apply(); + _responseCb.apply(); } } - catch(Ice.Exception __ex) + catch(Ice.Exception ex) { - if(__exceptionCb != null) + if(_exceptionCb != null) { - __exceptionCb.apply(__ex); + _exceptionCb.apply(ex); } } } - private final Functional_VoidCallback __responseCb; + private final Functional_VoidCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallback.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallback.java index f88b2d64ca6..f7b58652e3c 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallback.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallback.java @@ -27,18 +27,18 @@ public abstract class Functional_TwowayCallback extends IceInternal.Functional_C @Override public void exception(Ice.SystemException ex) { - if(__exceptionCb != null) + if(_exceptionCb != null) { - __exceptionCb.apply(ex); + _exceptionCb.apply(ex); } } @Override public final void exception(Ice.LocalException ex) { - if(__exceptionCb != null) + if(_exceptionCb != null) { - __exceptionCb.apply(ex); + _exceptionCb.apply(ex); } } } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1.java index c7b52ea9c52..7863604e081 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1.java @@ -17,7 +17,7 @@ public abstract class Functional_TwowayCallbackArg1<T> extends Functional_Twoway Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackArg1(boolean userExceptionCb, @@ -27,17 +27,17 @@ public abstract class Functional_TwowayCallbackArg1<T> extends Functional_Twoway { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response(T arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_GenericCallback1<T> __responseCb; + final private Functional_GenericCallback1<T> _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1UE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1UE.java index ed810994d8e..5669785c796 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1UE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackArg1UE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackArg1UE<T> Functional_BoolCallback sentCb) { super(userExceptionCb != null, responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBool.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBool.java index 973b107f1ff..85fa0654657 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBool.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBool.java @@ -16,7 +16,7 @@ public abstract class Functional_TwowayCallbackBool extends Functional_TwowayCal Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - this.__responseCb = responseCb; + this._responseCb = responseCb; } protected Functional_TwowayCallbackBool(boolean userExceptionCb, @@ -26,17 +26,17 @@ public abstract class Functional_TwowayCallbackBool extends Functional_TwowayCal { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - this.__responseCb = responseCb; + this._responseCb = responseCb; } @Override public void response(boolean arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_BoolCallback __responseCb; + final private Functional_BoolCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBoolUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBoolUE.java index 28d2a92777f..026e028bc90 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBoolUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackBoolUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackBoolUE Functional_BoolCallback sentCb) { super(userExceptionCb != null, responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByte.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByte.java index 986163e8d80..c455fd21f18 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByte.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByte.java @@ -16,7 +16,7 @@ public abstract class Functional_TwowayCallbackByte extends Functional_TwowayCal Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackByte(boolean userExceptionCb, @@ -26,17 +26,17 @@ public abstract class Functional_TwowayCallbackByte extends Functional_TwowayCal { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response(byte arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_ByteCallback __responseCb; + final private Functional_ByteCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByteUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByteUE.java index 1c0fb9bb8bc..9d220e66690 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByteUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackByteUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackByteUE Functional_BoolCallback sentCb) { super(userExceptionCb != null, responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java index 879014d73e5..391e8a39db0 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java @@ -17,7 +17,7 @@ public abstract class Functional_TwowayCallbackDouble Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackDouble(boolean userExceptionCb, @@ -27,16 +27,16 @@ public abstract class Functional_TwowayCallbackDouble { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } public void response(double arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_DoubleCallback __responseCb; + final private Functional_DoubleCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDoubleUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDoubleUE.java index a8d28cf12fe..617ea0d5c3d 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDoubleUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDoubleUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackDoubleUE Functional_BoolCallback sentCb) { super(userExceptionCb != null, responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloat.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloat.java index 7ea9b1f9753..0071e10777d 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloat.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloat.java @@ -17,7 +17,7 @@ public abstract class Functional_TwowayCallbackFloat Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackFloat(boolean userExceptionCb, @@ -27,17 +27,17 @@ public abstract class Functional_TwowayCallbackFloat { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response(float arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_FloatCallback __responseCb; + final private Functional_FloatCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloatUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloatUE.java index d5dc8141064..468f98222b6 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloatUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackFloatUE.java @@ -18,17 +18,17 @@ public abstract class Functional_TwowayCallbackFloatUE Functional_BoolCallback sentCb) { super(userExceptionCb != null, responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackInt.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackInt.java index 8c6fea2818e..1a1cb8bef1f 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackInt.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackInt.java @@ -17,7 +17,7 @@ public abstract class Functional_TwowayCallbackInt Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackInt(boolean userExceptionCb, @@ -27,17 +27,17 @@ public abstract class Functional_TwowayCallbackInt { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response(int arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_IntCallback __responseCb; + final private Functional_IntCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackIntUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackIntUE.java index b749b44b1ad..8fea1d3eb15 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackIntUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackIntUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackIntUE Functional_BoolCallback sentCb) { super(userExceptionCb != null, responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLong.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLong.java index bc6c654643e..5bcc7dfc55e 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLong.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLong.java @@ -17,7 +17,7 @@ public abstract class Functional_TwowayCallbackLong Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackLong(boolean userExceptionCb, @@ -27,17 +27,17 @@ public abstract class Functional_TwowayCallbackLong { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response(long arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_LongCallback __responseCb; + final private Functional_LongCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLongUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLongUE.java index 2eb6985fcb8..4421250e891 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLongUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackLongUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackLongUE Functional_BoolCallback sentCb) { super(responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShort.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShort.java index f6c835f0721..4eec9c26380 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShort.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShort.java @@ -17,7 +17,7 @@ public abstract class Functional_TwowayCallbackShort Functional_BoolCallback sentCb) { super(responseCb != null, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } protected Functional_TwowayCallbackShort(boolean userExceptionCb, @@ -27,17 +27,17 @@ public abstract class Functional_TwowayCallbackShort { super(exceptionCb, sentCb); CallbackBase.check(responseCb != null || (userExceptionCb && exceptionCb != null)); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response(short arg) { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(arg); + _responseCb.apply(arg); } } - final private Functional_ShortCallback __responseCb; + final private Functional_ShortCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShortUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShortUE.java index 47ff52de87c..91fa655453d 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShortUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackShortUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackShortUE Functional_BoolCallback sentCb) { super(responseCb, exceptionCb, sentCb); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + private final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackUE.java index 5ae5d838274..8c6cbee0e01 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackUE.java @@ -18,17 +18,17 @@ public abstract class Functional_TwowayCallbackUE extends Functional_TwowayCallb { super(exceptionCb, sentCb); CallbackBase.check(responseCb || (userExceptionCb != null && exceptionCb != null)); - __userExceptionCb = userExceptionCb; + _userExceptionCb = userExceptionCb; } @Override public final void exception(Ice.UserException ex) { - if(__userExceptionCb != null) + if(_userExceptionCb != null) { - __userExceptionCb.apply(ex); + _userExceptionCb.apply(ex); } } - protected final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; + protected final Functional_GenericCallback1<Ice.UserException> _userExceptionCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackVoidUE.java b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackVoidUE.java index 080b4ad863a..92e6eea0c4d 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackVoidUE.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackVoidUE.java @@ -19,17 +19,17 @@ public abstract class Functional_TwowayCallbackVoidUE Functional_BoolCallback sentCb) { super(responseCb != null, userExceptionCb, exceptionCb, sentCb); - __responseCb = responseCb; + _responseCb = responseCb; } @Override public void response() { - if(__responseCb != null) + if(_responseCb != null) { - __responseCb.apply(); + _responseCb.apply(); } } - private final Functional_VoidCallback __responseCb; + private final Functional_VoidCallback _responseCb; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Incoming.java b/java-compat/src/Ice/src/main/java/IceInternal/Incoming.java index 1dbfdc3554a..5234074afc0 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Incoming.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Incoming.java @@ -101,7 +101,7 @@ final public class Incoming extends IncomingBase implements Ice.Request // // Read the current. // - _current.id.__read(_is); + _current.id.read(_is); // // For compatibility with the old FacetPath. @@ -211,7 +211,7 @@ final public class Incoming extends IncomingBase implements Ice.Request Thread.currentThread().setContextClassLoader(_servant.getClass().getClassLoader()); } - _servant.__dispatch(this, _current); + _servant._iceDispatch(this, _current); // // If the request was not dispatched asynchronously, send the response. diff --git a/java-compat/src/Ice/src/main/java/IceInternal/IncomingBase.java b/java-compat/src/Ice/src/main/java/IceInternal/IncomingBase.java index 2723ce7a7b7..df4a9d419c7 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/IncomingBase.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/IncomingBase.java @@ -345,7 +345,7 @@ class IncomingBase { assert(false); } - ex.id.__write(_os); + ex.id.write(_os); // // For compatibility with the old FacetPath. diff --git a/java-compat/src/Ice/src/main/java/IceInternal/LocatorInfo.java b/java-compat/src/Ice/src/main/java/IceInternal/LocatorInfo.java index 65f0c20840c..b1f1b846abe 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/LocatorInfo.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/LocatorInfo.java @@ -25,7 +25,7 @@ public final class LocatorInfo EndpointI[] endpoints = null; if(proxy != null) { - Reference r = ((Ice.ObjectPrxHelperBase)proxy).__reference(); + Reference r = ((Ice.ObjectPrxHelperBase)proxy)._getReference(); if(_ref.isWellKnown() && !Protocol.isSupported(_ref.getEncoding(), r.getEncoding())) { // @@ -647,7 +647,7 @@ public final class LocatorInfo private void finishRequest(Reference ref, java.util.List<Reference> wellKnownRefs, Ice.ObjectPrx proxy, boolean notRegistered) { - if(proxy == null || ((Ice.ObjectPrxHelperBase)proxy).__reference().isIndirect()) + if(proxy == null || ((Ice.ObjectPrxHelperBase)proxy)._getReference().isIndirect()) { // // Remove the cached references of well-known objects for which we tried @@ -661,11 +661,11 @@ public final class LocatorInfo if(!ref.isWellKnown()) { - if(proxy != null && !((Ice.ObjectPrxHelperBase)proxy).__reference().isIndirect()) + if(proxy != null && !((Ice.ObjectPrxHelperBase)proxy)._getReference().isIndirect()) { // Cache the adapter endpoints. _table.addAdapterEndpoints(ref.getAdapterId(), - ((Ice.ObjectPrxHelperBase)proxy).__reference().getEndpoints()); + ((Ice.ObjectPrxHelperBase)proxy)._getReference().getEndpoints()); } else if(notRegistered) // If the adapter isn't registered anymore, remove it from the cache. { @@ -680,10 +680,10 @@ public final class LocatorInfo } else { - if(proxy != null && !((Ice.ObjectPrxHelperBase)proxy).__reference().isWellKnown()) + if(proxy != null && !((Ice.ObjectPrxHelperBase)proxy)._getReference().isWellKnown()) { // Cache the well-known object reference. - _table.addObjectReference(ref.getIdentity(), ((Ice.ObjectPrxHelperBase)proxy).__reference()); + _table.addObjectReference(ref.getIdentity(), ((Ice.ObjectPrxHelperBase)proxy)._getReference()); } else if(notRegistered) // If the well-known object isn't registered anymore, remove it from the cache. { diff --git a/java-compat/src/Ice/src/main/java/IceInternal/LocatorManager.java b/java-compat/src/Ice/src/main/java/IceInternal/LocatorManager.java index 201dacf41b2..35acf199ec3 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/LocatorManager.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/LocatorManager.java @@ -58,7 +58,7 @@ public final class LocatorManager LocatorKey set(Ice.LocatorPrx locator) { - Reference r = ((Ice.ObjectPrxHelperBase)locator).__reference(); + Reference r = ((Ice.ObjectPrxHelperBase)locator)._getReference(); _id = r.getIdentity(); _encoding = r.getEncoding(); return this; diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ObserverHelper.java b/java-compat/src/Ice/src/main/java/IceInternal/ObserverHelper.java index 290be728304..663d31d1836 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ObserverHelper.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ObserverHelper.java @@ -40,7 +40,7 @@ public final class ObserverHelper get(Ice.ObjectPrx proxy, String op, java.util.Map<String, String> context) { CommunicatorObserver obsv = - ((Ice.ObjectPrxHelperBase)proxy).__reference().getInstance().initializationData().observer; + ((Ice.ObjectPrxHelperBase)proxy)._getReference().getInstance().initializationData().observer; if(obsv != null) { InvocationObserver observer; diff --git a/java-compat/src/Ice/src/main/java/IceInternal/OutgoingAsync.java b/java-compat/src/Ice/src/main/java/IceInternal/OutgoingAsync.java index 85e5522be77..2d47a89a4da 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/OutgoingAsync.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/OutgoingAsync.java @@ -27,21 +27,21 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase public OutgoingAsync(Ice.ObjectPrx prx, String operation, CallbackBase cb) { super((Ice.ObjectPrxHelperBase)prx, operation, cb); - _encoding = Protocol.getCompatibleEncoding(_proxy.__reference().getEncoding()); + _encoding = Protocol.getCompatibleEncoding(_proxy._getReference().getEncoding()); _is = null; } public OutgoingAsync(Ice.ObjectPrx prx, String operation, CallbackBase cb, Ice.InputStream is, Ice.OutputStream os) { super((Ice.ObjectPrxHelperBase)prx, operation, cb, os); - _encoding = Protocol.getCompatibleEncoding(_proxy.__reference().getEncoding()); + _encoding = Protocol.getCompatibleEncoding(_proxy._getReference().getEncoding()); _is = is; } public void prepare(String operation, Ice.OperationMode mode, java.util.Map<String, String> ctx, boolean explicitCtx, boolean synchronous) { - Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy.__reference().getProtocol())); + Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy._getReference().getProtocol())); _mode = mode; _synchronous = synchronous; @@ -52,7 +52,7 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase } _observer = ObserverHelper.get(_proxy, operation, ctx); - switch(_proxy.__reference().getMode()) + switch(_proxy._getReference().getMode()) { case Reference.ModeTwoway: case Reference.ModeOneway: @@ -65,14 +65,14 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase case Reference.ModeBatchOneway: case Reference.ModeBatchDatagram: { - _proxy.__getBatchRequestQueue().prepareBatchRequest(_os); + _proxy._getBatchRequestQueue().prepareBatchRequest(_os); break; } } - Reference ref = _proxy.__reference(); + Reference ref = _proxy._getReference(); - ref.getIdentity().__write(_os); + ref.getIdentity().write(_os); // // For compatibility with the old FacetPath. @@ -135,7 +135,7 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase public int invokeCollocated(CollocatedRequestHandler handler) { // The stream cannot be cached if the proxy is not a twoway or there is an invocation timeout set. - if(!_proxy.ice_isTwoway() || _proxy.__reference().getInvocationTimeout() > 0) + if(!_proxy.ice_isTwoway() || _proxy._getReference().getInvocationTimeout() > 0) { // Disable caching by marking the streams as cached! _state |= StateCachedBuffers; @@ -146,7 +146,7 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase @Override public void abort(Ice.Exception ex) { - int mode = _proxy.__reference().getMode(); + int mode = _proxy._getReference().getMode(); if(mode == Reference.ModeBatchOneway || mode == Reference.ModeBatchDatagram) { // @@ -154,7 +154,7 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase // must notify the connection about that we give up ownership // of the batch stream. // - _proxy.__getBatchRequestQueue().abortBatchRequest(_os); + _proxy._getBatchRequestQueue().abortBatchRequest(_os); } super.abort(ex); @@ -162,14 +162,14 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase public void invoke() { - int mode = _proxy.__reference().getMode(); + int mode = _proxy._getReference().getMode(); if(mode == Reference.ModeBatchOneway || mode == Reference.ModeBatchDatagram) { // // NOTE: we don't call sent/completed callbacks for batch AMI requests // _sentSynchronously = true; - _proxy.__getBatchRequestQueue().finishBatchRequest(_os, _proxy, getOperation()); + _proxy._getBatchRequestQueue().finishBatchRequest(_os, _proxy, getOperation()); finished(true); } else @@ -233,7 +233,7 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase case ReplyStatus.replyOperationNotExist: { Ice.Identity id = new Ice.Identity(); - id.__read(_is); + id.read(_is); // // For compatibility with the old FacetPath. @@ -408,7 +408,7 @@ public class OutgoingAsync extends ProxyOutgoingAsyncBase @Override public void cacheMessageBuffers() { - if(_proxy.__reference().getInstance().cacheMessageBuffers() > 0) + if(_proxy._getReference().getInstance().cacheMessageBuffers() > 0) { synchronized(this) { diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ProxyFactory.java b/java-compat/src/Ice/src/main/java/IceInternal/ProxyFactory.java index ed3f1b81bd6..8b96b2081bc 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ProxyFactory.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ProxyFactory.java @@ -26,7 +26,7 @@ public final class ProxyFactory if(proxy != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)proxy; - return h.__reference().toString(); + return h._getReference().toString(); } else { @@ -48,7 +48,7 @@ public final class ProxyFactory if(proxy != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)proxy; - return h.__reference().toProperty(prefix); + return h._getReference().toProperty(prefix); } else { @@ -60,7 +60,7 @@ public final class ProxyFactory streamToProxy(Ice.InputStream s) { Ice.Identity ident = new Ice.Identity(); - ident.__read(s); + ident.read(s); Reference ref = _instance.referenceFactory().create(ident, s); return referenceToProxy(ref); @@ -72,7 +72,7 @@ public final class ProxyFactory if(ref != null) { Ice.ObjectPrxHelperBase proxy = new Ice.ObjectPrxHelperBase(); - proxy.__setup(ref); + proxy._setup(ref); return proxy; } else diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ProxyFlushBatch.java b/java-compat/src/Ice/src/main/java/IceInternal/ProxyFlushBatch.java index eb49b24c6f1..7a53d1b2c24 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ProxyFlushBatch.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ProxyFlushBatch.java @@ -28,7 +28,7 @@ public class ProxyFlushBatch extends ProxyOutgoingAsyncBase { super(prx, operation, callback); _observer = ObserverHelper.get(prx, operation); - _batchRequestNum = prx.__getBatchRequestQueue().swap(_os); + _batchRequestNum = prx._getBatchRequestQueue().swap(_os); } @Override @@ -54,7 +54,7 @@ public class ProxyFlushBatch extends ProxyOutgoingAsyncBase public void invoke() { - Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy.__reference().getProtocol())); + Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy._getReference().getProtocol())); invokeImpl(true); // userThread = true } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ProxyOutgoingAsyncBase.java b/java-compat/src/Ice/src/main/java/IceInternal/ProxyOutgoingAsyncBase.java index a38c6c28c7a..bf9a5388f07 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ProxyOutgoingAsyncBase.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ProxyOutgoingAsyncBase.java @@ -80,7 +80,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase // require could end up waiting for the flush of the // connection to be done. // - _proxy.__updateRequestHandler(_handler, null); // Clear request handler and always retry. + _proxy._updateRequestHandler(_handler, null); // Clear request handler and always retry. _instance.retryQueue().add(this, 0); } catch(Ice.Exception exc) @@ -99,7 +99,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase public void cancelable(final CancellationHandler handler) { - if(_proxy.__reference().getInvocationTimeout() == -2 && _cachedConnection != null) + if(_proxy._getReference().getInvocationTimeout() == -2 && _cachedConnection != null) { final int timeout = _cachedConnection.timeout(); if(timeout > 0) @@ -138,7 +138,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase protected ProxyOutgoingAsyncBase(Ice.ObjectPrxHelperBase prx, String op, CallbackBase delegate) { - super(prx.ice_getCommunicator(), prx.__reference().getInstance(), op, delegate); + super(prx.ice_getCommunicator(), prx._getReference().getInstance(), op, delegate); _proxy = prx; _mode = Ice.OperationMode.Normal; _cnt = 0; @@ -147,7 +147,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase protected ProxyOutgoingAsyncBase(Ice.ObjectPrxHelperBase prx, String op, CallbackBase delegate, Ice.OutputStream os) { - super(prx.ice_getCommunicator(), prx.__reference().getInstance(), op, delegate, os); + super(prx.ice_getCommunicator(), prx._getReference().getInstance(), op, delegate, os); _proxy = prx; _mode = Ice.OperationMode.Normal; _cnt = 0; @@ -172,7 +172,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase { if(userThread) { - int invocationTimeout = _proxy.__reference().getInvocationTimeout(); + int invocationTimeout = _proxy._getReference().getInvocationTimeout(); if(invocationTimeout > 0) { _future = _instance.timer().schedule( @@ -200,7 +200,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase { _sent = false; _handler = null; - _handler = _proxy.__getRequestHandler(); + _handler = _proxy._getRequestHandler(); int status = _handler.sendAsyncRequest(this); if((status & AsyncStatus.Sent) > 0) { @@ -224,7 +224,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase } catch(RetryException ex) { - _proxy.__updateRequestHandler(_handler, null); // Clear request handler and always retry. + _proxy._updateRequestHandler(_handler, null); // Clear request handler and always retry. } catch(Ice.Exception ex) { @@ -304,7 +304,7 @@ public abstract class ProxyOutgoingAsyncBase extends OutgoingAsyncBase protected int handleException(Ice.Exception exc) { Ice.Holder<Integer> interval = new Ice.Holder<Integer>(); - _cnt = _proxy.__handleException(exc, _handler, _mode, _sent, interval, _cnt); + _cnt = _proxy._handleException(exc, _handler, _mode, _sent, interval, _cnt); return interval.value; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/Reference.java b/java-compat/src/Ice/src/main/java/IceInternal/Reference.java index 48ac1b0788a..cbe05e19cd9 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/Reference.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/Reference.java @@ -283,8 +283,8 @@ public abstract class Reference implements Cloneable if(!s.getEncoding().equals(Ice.Util.Encoding_1_0)) { - _protocol.__write(s); - _encoding.__write(s); + _protocol.write(s); + _encoding.write(s); } // Derived class writes the remainder of the reference. diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ReferenceFactory.java b/java-compat/src/Ice/src/main/java/IceInternal/ReferenceFactory.java index a6ee6082bab..4162156654e 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ReferenceFactory.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ReferenceFactory.java @@ -587,9 +587,9 @@ public final class ReferenceFactory if(!s.getEncoding().equals(Ice.Util.Encoding_1_0)) { protocol = new Ice.ProtocolVersion(); - protocol.__read(s); + protocol.read(s); encoding = new Ice.EncodingVersion(); - encoding.__read(s); + encoding.read(s); } else { @@ -743,7 +743,7 @@ public final class ReferenceFactory LocatorInfo locatorInfo = null; if(_defaultLocator != null) { - if(!((Ice.ObjectPrxHelperBase)_defaultLocator).__reference().getEncoding().equals(encoding)) + if(!((Ice.ObjectPrxHelperBase)_defaultLocator)._getReference().getEncoding().equals(encoding)) { locatorInfo = _instance.locatorManager().get( (Ice.LocatorPrx)_defaultLocator.ice_encodingVersion(encoding)); @@ -783,7 +783,7 @@ public final class ReferenceFactory Ice.LocatorPrx locator = Ice.LocatorPrxHelper.uncheckedCast(_communicator.propertyToProxy(property)); if(locator != null) { - if(!((Ice.ObjectPrxHelperBase)locator).__reference().getEncoding().equals(encoding)) + if(!((Ice.ObjectPrxHelperBase)locator)._getReference().getEncoding().equals(encoding)) { locatorInfo = _instance.locatorManager().get((Ice.LocatorPrx)locator.ice_encodingVersion(encoding)); } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/RequestHandlerFactory.java b/java-compat/src/Ice/src/main/java/IceInternal/RequestHandlerFactory.java index ff4022724a9..053b7e53499 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/RequestHandlerFactory.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/RequestHandlerFactory.java @@ -28,7 +28,7 @@ public final class RequestHandlerFactory Ice.ObjectAdapter adapter = _instance.objectAdapterFactory().findObjectAdapter(proxy); if(adapter != null) { - return proxy.__setRequestHandler(new CollocatedRequestHandler(ref, adapter)); + return proxy._setRequestHandler(new CollocatedRequestHandler(ref, adapter)); } } @@ -73,7 +73,7 @@ public final class RequestHandlerFactory ref.getConnection(handler); } } - return proxy.__setRequestHandler(handler.connect(proxy)); + return proxy._setRequestHandler(handler.connect(proxy)); } void diff --git a/java-compat/src/Ice/src/main/java/IceInternal/RoutableReference.java b/java-compat/src/Ice/src/main/java/IceInternal/RoutableReference.java index bdca554000a..6f84899597d 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/RoutableReference.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/RoutableReference.java @@ -394,7 +394,7 @@ public class RoutableReference extends Reference if(_routerInfo != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)_routerInfo.getRouter(); - java.util.Map<String, String> routerProperties = h.__reference().toProperty(prefix + ".Router"); + java.util.Map<String, String> routerProperties = h._getReference().toProperty(prefix + ".Router"); for(java.util.Map.Entry<String, String> p : routerProperties.entrySet()) { properties.put(p.getKey(), p.getValue()); @@ -404,7 +404,7 @@ public class RoutableReference extends Reference if(_locatorInfo != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)_locatorInfo.getLocator(); - java.util.Map<String, String> locatorProperties = h.__reference().toProperty(prefix + ".Locator"); + java.util.Map<String, String> locatorProperties = h._getReference().toProperty(prefix + ".Locator"); for(java.util.Map.Entry<String, String> p : locatorProperties.entrySet()) { properties.put(p.getKey(), p.getValue()); diff --git a/java-compat/src/Ice/src/main/java/IceInternal/RouterInfo.java b/java-compat/src/Ice/src/main/java/IceInternal/RouterInfo.java index 1de08e756fe..e5fdff0e14b 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/RouterInfo.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/RouterInfo.java @@ -197,7 +197,7 @@ public final class RouterInfo // // If getClientProxy() return nil, use router endpoints. // - _clientEndpoints = ((Ice.ObjectPrxHelperBase)_router).__reference().getEndpoints(); + _clientEndpoints = ((Ice.ObjectPrxHelperBase)_router)._getReference().getEndpoints(); } else { @@ -213,7 +213,7 @@ public final class RouterInfo clientProxy = clientProxy.ice_timeout(_router.ice_getConnection().timeout()); } - _clientEndpoints = ((Ice.ObjectPrxHelperBase)clientProxy).__reference().getEndpoints(); + _clientEndpoints = ((Ice.ObjectPrxHelperBase)clientProxy)._getReference().getEndpoints(); } } return _clientEndpoints; @@ -228,7 +228,7 @@ public final class RouterInfo } serverProxy = serverProxy.ice_router(null); // The server proxy cannot be routed. - _serverEndpoints = ((Ice.ObjectPrxHelperBase)serverProxy).__reference().getEndpoints(); + _serverEndpoints = ((Ice.ObjectPrxHelperBase)serverProxy)._getReference().getEndpoints(); return _serverEndpoints; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/TraceUtil.java b/java-compat/src/Ice/src/main/java/IceInternal/TraceUtil.java index d50797350e5..f433f823bd1 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/TraceUtil.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/TraceUtil.java @@ -173,7 +173,7 @@ public final class TraceUtil } Ice.Identity identity = new Ice.Identity(); - identity.__read(stream); + identity.read(stream); out.write("\nidentity = " + Ice.Util.identityToString(identity, toStringMode)); String[] facet = stream.readStringSeq(); diff --git a/java-compat/src/Ice/src/main/java/IceInternal/TwowayCallback.java b/java-compat/src/Ice/src/main/java/IceInternal/TwowayCallback.java index 713f965d848..c06003629d5 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/TwowayCallback.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/TwowayCallback.java @@ -16,19 +16,19 @@ public abstract class TwowayCallback extends CallbackBase implements Ice.TwowayC } @Override - public void exception(Ice.SystemException __ex) + public void exception(Ice.SystemException ex) { - exception(new Ice.UnknownException(__ex)); + exception(new Ice.UnknownException(ex)); } @Override - public final void __sent(Ice.AsyncResult __result) + public final void _iceSent(Ice.AsyncResult result) { - sent(__result.sentSynchronously()); + sent(result.sentSynchronously()); } @Override - public final boolean __hasSentCallback() + public final boolean _iceHasSentCallback() { return true; } diff --git a/java-compat/src/Ice/src/main/java/IceInternal/UdpEndpointI.java b/java-compat/src/Ice/src/main/java/IceInternal/UdpEndpointI.java index 8c1d0bc837d..740e33354c8 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/UdpEndpointI.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/UdpEndpointI.java @@ -256,8 +256,8 @@ final class UdpEndpointI extends IPEndpointI super.streamWriteImpl(s); if(s.getEncoding().equals(Ice.Util.Encoding_1_0)) { - Ice.Util.Protocol_1_0.__write(s); - Ice.Util.Encoding_1_0.__write(s); + Ice.Util.Protocol_1_0.write(s); + Ice.Util.Encoding_1_0.write(s); } // Not transmitted. //s.writeBool(_connect); diff --git a/java-compat/src/Ice/src/main/java/IceInternal/ValueWriter.java b/java-compat/src/Ice/src/main/java/IceInternal/ValueWriter.java index 3184c250734..ab73a18b8c7 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/ValueWriter.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/ValueWriter.java @@ -84,7 +84,7 @@ public final class ValueWriter { writeName(name, out); Ice.ObjectPrxHelperBase proxy = (Ice.ObjectPrxHelperBase)value; - out.print(proxy.__reference().toString()); + out.print(proxy._getReference().toString()); } else if(value instanceof Ice.Object) { diff --git a/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/InitBean.java b/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/InitBean.java index 09ab74f754f..eb0fa9a3a01 100644 --- a/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/InitBean.java +++ b/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/InitBean.java @@ -41,4 +41,4 @@ public class InitBean implements Init init() { } -}
\ No newline at end of file +} diff --git a/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/ServiceI.java b/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/ServiceI.java index 4140c7c8fd7..da731b86903 100644 --- a/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/ServiceI.java +++ b/java-compat/test/ejb/src/ejb1/com/zeroc/ejb/ServiceI.java @@ -38,4 +38,4 @@ public class ServiceI extends _ServiceDisp { service.addAccount(s); } -}
\ No newline at end of file +} diff --git a/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/InitBean.java b/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/InitBean.java index 277f121cc79..236add0a74f 100644 --- a/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/InitBean.java +++ b/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/InitBean.java @@ -41,4 +41,4 @@ public class InitBean implements Init init() { } -}
\ No newline at end of file +} diff --git a/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/ServiceI.java b/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/ServiceI.java index 4140c7c8fd7..da731b86903 100644 --- a/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/ServiceI.java +++ b/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/ServiceI.java @@ -38,4 +38,4 @@ public class ServiceI extends _ServiceDisp { service.addAccount(s); } -}
\ No newline at end of file +} diff --git a/java-compat/test/src/main/java/test/Ice/interrupt/TestControllerI.java b/java-compat/test/src/main/java/test/Ice/interrupt/TestControllerI.java index 8c63779681c..edad0380d0e 100644 --- a/java-compat/test/src/main/java/test/Ice/interrupt/TestControllerI.java +++ b/java-compat/test/src/main/java/test/Ice/interrupt/TestControllerI.java @@ -32,7 +32,7 @@ class TestControllerI extends test.Ice.interrupt.Test._TestIntfControllerDisp @Override synchronized public void - interrupt(Ice.Current __current) + interrupt(Ice.Current current) throws test.Ice.interrupt.Test.CannotInterruptException { if(_threads.isEmpty()) diff --git a/java-compat/test/src/main/java/test/Ice/packagemd/InitialI.java b/java-compat/test/src/main/java/test/Ice/packagemd/InitialI.java index 4c006512435..8a1e74ecad3 100644 --- a/java-compat/test/src/main/java/test/Ice/packagemd/InitialI.java +++ b/java-compat/test/src/main/java/test/Ice/packagemd/InitialI.java @@ -19,28 +19,28 @@ import test.Ice.packagemd.Test1._notify; public final class InitialI extends _InitialDisp { public Ice.Object - getTest1C2AsObject(Ice.Current __current) + getTest1C2AsObject(Ice.Current current) { return new C2(); } @Override public C1 - getTest1C2AsC1(Ice.Current __current) + getTest1C2AsC1(Ice.Current current) { return new C2(); } @Override public C2 - getTest1C2AsC2(Ice.Current __current) + getTest1C2AsC2(Ice.Current current) { return new C2(); } @Override public void - throwTest1E2AsE1(Ice.Current __current) + throwTest1E2AsE1(Ice.Current current) throws E1 { throw new E2(); @@ -48,7 +48,7 @@ public final class InitialI extends _InitialDisp @Override public void - throwTest1E2AsE2(Ice.Current __current) + throwTest1E2AsE2(Ice.Current current) throws E2 { throw new E2(); @@ -56,35 +56,35 @@ public final class InitialI extends _InitialDisp @Override public void - throwTest1Notify(Ice.Current __current) + throwTest1Notify(Ice.Current current) throws _notify { throw new _notify(); } public Ice.Object - getTest2C2AsObject(Ice.Current __current) + getTest2C2AsObject(Ice.Current current) { return new test.Ice.packagemd.testpkg.Test2.C2(); } @Override public test.Ice.packagemd.testpkg.Test2.C1 - getTest2C2AsC1(Ice.Current __current) + getTest2C2AsC1(Ice.Current current) { return new test.Ice.packagemd.testpkg.Test2.C2(); } @Override public test.Ice.packagemd.testpkg.Test2.C2 - getTest2C2AsC2(Ice.Current __current) + getTest2C2AsC2(Ice.Current current) { return new test.Ice.packagemd.testpkg.Test2.C2(); } @Override public void - throwTest2E2AsE1(Ice.Current __current) + throwTest2E2AsE1(Ice.Current current) throws test.Ice.packagemd.testpkg.Test2.E1 { throw new test.Ice.packagemd.testpkg.Test2.E2(); @@ -92,35 +92,35 @@ public final class InitialI extends _InitialDisp @Override public void - throwTest2E2AsE2(Ice.Current __current) + throwTest2E2AsE2(Ice.Current current) throws test.Ice.packagemd.testpkg.Test2.E2 { throw new test.Ice.packagemd.testpkg.Test2.E2(); } public Ice.Object - getTest3C2AsObject(Ice.Current __current) + getTest3C2AsObject(Ice.Current current) { return new test.Ice.packagemd.testpkg.Test3.C2(); } @Override public test.Ice.packagemd.testpkg.Test3.C1 - getTest3C2AsC1(Ice.Current __current) + getTest3C2AsC1(Ice.Current current) { return new test.Ice.packagemd.testpkg.Test3.C2(); } @Override public test.Ice.packagemd.testpkg.Test3.C2 - getTest3C2AsC2(Ice.Current __current) + getTest3C2AsC2(Ice.Current current) { return new test.Ice.packagemd.testpkg.Test3.C2(); } @Override public void - throwTest3E2AsE1(Ice.Current __current) + throwTest3E2AsE1(Ice.Current current) throws test.Ice.packagemd.testpkg.Test3.E1 { throw new test.Ice.packagemd.testpkg.Test3.E2(); @@ -128,7 +128,7 @@ public final class InitialI extends _InitialDisp @Override public void - throwTest3E2AsE2(Ice.Current __current) + throwTest3E2AsE2(Ice.Current current) throws test.Ice.packagemd.testpkg.Test3.E2 { throw new test.Ice.packagemd.testpkg.Test3.E2(); @@ -136,8 +136,8 @@ public final class InitialI extends _InitialDisp @Override public void - shutdown(Ice.Current __current) + shutdown(Ice.Current current) { - __current.adapter.getCommunicator().shutdown(); + current.adapter.getCommunicator().shutdown(); } } diff --git a/java-compat/test/src/main/java/test/Ice/stream/Client.java b/java-compat/test/src/main/java/test/Ice/stream/Client.java index b00dd482951..6bce9f33e62 100644 --- a/java-compat/test/src/main/java/test/Ice/stream/Client.java +++ b/java-compat/test/src/main/java/test/Ice/stream/Client.java @@ -43,7 +43,7 @@ public class Client extends test.Util.Application public void write(Ice.OutputStream out) { - obj.__write(out); + obj._iceWrite(out); called = true; } @@ -58,7 +58,7 @@ public class Client extends test.Util.Application read(Ice.InputStream in) { obj = new MyClass(); - obj.__read(in); + obj._iceRead(in); called = true; } diff --git a/java-compat/test/src/main/java/test/Slice/keyword/Client.java b/java-compat/test/src/main/java/test/Slice/keyword/Client.java index c972b6320f1..62f377f3fbe 100644 --- a/java-compat/test/src/main/java/test/Slice/keyword/Client.java +++ b/java-compat/test/src/main/java/test/Slice/keyword/Client.java @@ -40,10 +40,10 @@ public class Client @Override public void - checkedCast_async(AMD_catch_checkedCast __cb, int _clone, Ice.Current __current) + checkedCast_async(AMD_catch_checkedCast cb, int _clone, Ice.Current current) { int _continue = 0; - __cb.ice_response(_continue); + cb.ice_response(_continue); } } @@ -56,9 +56,9 @@ public class Client @Override public void - _do(Ice.Current __current) + _do(Ice.Current current) { - assert __current.operation.equals("do"); + assert current.operation.equals("do"); } } @@ -71,7 +71,7 @@ public class Client @Override public void - foo(defaultPrx _equals, Ice.IntHolder _final, Ice.Current __current) + foo(defaultPrx _equals, Ice.IntHolder _final, Ice.Current current) { } } @@ -103,21 +103,21 @@ public class Client @Override public void - checkedCast_async(AMD_catch_checkedCast __cb, int _clone, Ice.Current __current) + checkedCast_async(AMD_catch_checkedCast cb, int _clone, Ice.Current current) { int _continue = 0; - __cb.ice_response(_continue); + cb.ice_response(_continue); } @Override public void - _do(Ice.Current __current) + _do(Ice.Current current) { } @Override public void - foo(defaultPrx _equals, Ice.IntHolder _final, Ice.Current __current) + foo(defaultPrx _equals, Ice.IntHolder _final, Ice.Current current) { } } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/Blobject.java b/java/src/Ice/src/main/java/com/zeroc/Ice/Blobject.java index 6855c538e92..ad14827ff88 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/Blobject.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/Blobject.java @@ -38,7 +38,7 @@ public interface Blobject extends com.zeroc.Ice.Object throws UserException; @Override - default CompletionStage<OutputStream> __dispatch(com.zeroc.IceInternal.Incoming in, Current current) + default CompletionStage<OutputStream> _iceDispatch(com.zeroc.IceInternal.Incoming in, Current current) throws UserException { byte[] inEncaps = in.readParamEncaps(); diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/BlobjectAsync.java b/java/src/Ice/src/main/java/com/zeroc/Ice/BlobjectAsync.java index 3498fcfaa2c..2e3acf67f54 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/BlobjectAsync.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/BlobjectAsync.java @@ -44,7 +44,7 @@ public interface BlobjectAsync extends com.zeroc.Ice.Object throws UserException; @Override - default CompletionStage<OutputStream> __dispatch(com.zeroc.IceInternal.Incoming in, Current current) + default CompletionStage<OutputStream> _iceDispatch(com.zeroc.IceInternal.Incoming in, Current current) throws UserException { byte[] inEncaps = in.readParamEncaps(); diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/CommunicatorI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/CommunicatorI.java index 035c6b39f15..3ee8b9f7054 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/CommunicatorI.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/CommunicatorI.java @@ -206,16 +206,16 @@ public final class CommunicatorI implements Communicator @Override public void flushBatchRequests() { - __flushBatchRequestsAsync().__wait(); + _iceI_flushBatchRequestsAsync().waitForResponse(); } @Override public java.util.concurrent.CompletableFuture<Void> flushBatchRequestsAsync() { - return __flushBatchRequestsAsync(); + return _iceI_flushBatchRequestsAsync(); } - public com.zeroc.IceInternal.CommunicatorFlushBatch __flushBatchRequestsAsync() + public com.zeroc.IceInternal.CommunicatorFlushBatch _iceI_flushBatchRequestsAsync() { com.zeroc.IceInternal.OutgoingConnectionFactory connectionFactory = _instance.outgoingConnectionFactory(); com.zeroc.IceInternal.ObjectAdapterFactory adapterFactory = _instance.objectAdapterFactory(); @@ -224,19 +224,19 @@ public final class CommunicatorI implements Communicator // This callback object receives the results of all invocations // of Connection.begin_flushBatchRequests. // - com.zeroc.IceInternal.CommunicatorFlushBatch __f = + com.zeroc.IceInternal.CommunicatorFlushBatch f = new com.zeroc.IceInternal.CommunicatorFlushBatch(this, _instance); - connectionFactory.flushAsyncBatchRequests(__f); - adapterFactory.flushAsyncBatchRequests(__f); + connectionFactory.flushAsyncBatchRequests(f); + adapterFactory.flushAsyncBatchRequests(f); // // Inform the callback that we have finished initiating all of the // flush requests. // - __f.ready(); + f.ready(); - return __f; + return f; } @Override diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java index 24ce63ef54d..3b73897443b 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java @@ -431,16 +431,16 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler @Override public void flushBatchRequests() { - ObjectPrx.__waitForCompletion(flushBatchRequestsAsync()); + ObjectPrx.waitForResponseForCompletion(flushBatchRequestsAsync()); } @Override public java.util.concurrent.CompletableFuture<Void> flushBatchRequestsAsync() { - com.zeroc.IceInternal.ConnectionFlushBatch __f = + com.zeroc.IceInternal.ConnectionFlushBatch f = new com.zeroc.IceInternal.ConnectionFlushBatch(this, _communicator, _instance); - __f.invoke(); - return __f; + f.invoke(); + return f; } @Override @@ -850,10 +850,10 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler throw ex; } - _readProtocol.ice_read(_readStream); + _readProtocol.read(_readStream); Protocol.checkSupportedProtocol(_readProtocol); - _readProtocolEncoding.ice_read(_readStream); + _readProtocolEncoding.read(_readStream); Protocol.checkSupportedProtocolEncoding(_readProtocolEncoding); _readStream.readByte(); // messageType @@ -1849,8 +1849,8 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler // OutputStream os = new OutputStream(_instance, Protocol.currentProtocolEncoding); os.writeBlob(Protocol.magic); - Protocol.currentProtocol.ice_write(os); - Protocol.currentProtocolEncoding.ice_write(os); + Protocol.currentProtocol.write(os); + Protocol.currentProtocolEncoding.write(os); os.writeByte(Protocol.closeConnectionMsg); os.writeByte((byte) 0); // compression status: always report 0 for // CloseConnection in Java. @@ -1882,8 +1882,8 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler { OutputStream os = new OutputStream(_instance, Protocol.currentProtocolEncoding); os.writeBlob(Protocol.magic); - Protocol.currentProtocol.ice_write(os); - Protocol.currentProtocolEncoding.ice_write(os); + Protocol.currentProtocol.write(os); + Protocol.currentProtocolEncoding.write(os); os.writeByte(Protocol.validateConnectionMsg); os.writeByte((byte) 0); os.writeInt(Protocol.headerSize); // Message size. @@ -1933,8 +1933,8 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler if(_writeStream.isEmpty()) { _writeStream.writeBlob(Protocol.magic); - Protocol.currentProtocol.ice_write(_writeStream); - Protocol.currentProtocolEncoding.ice_write(_writeStream); + Protocol.currentProtocol.write(_writeStream); + Protocol.currentProtocolEncoding.write(_writeStream); _writeStream.writeByte(Protocol.validateConnectionMsg); _writeStream.writeByte((byte) 0); // Compression status // (always zero for @@ -2006,10 +2006,10 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler throw ex; } - _readProtocol.ice_read(_readStream); + _readProtocol.read(_readStream); Protocol.checkSupportedProtocol(_readProtocol); - _readProtocolEncoding.ice_read(_readStream); + _readProtocolEncoding.read(_readStream); Protocol.checkSupportedProtocolEncoding(_readProtocolEncoding); byte messageType = _readStream.readByte(); diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/DispatchInterceptor.java b/java/src/Ice/src/main/java/com/zeroc/Ice/DispatchInterceptor.java index d4cb560b808..58f7478dc00 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/DispatchInterceptor.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/DispatchInterceptor.java @@ -37,7 +37,7 @@ public abstract class DispatchInterceptor implements com.zeroc.Ice.Object throws UserException; @Override - public CompletionStage<OutputStream> __dispatch(com.zeroc.IceInternal.Incoming in, Current current) + public CompletionStage<OutputStream> _iceDispatch(com.zeroc.IceInternal.Incoming in, Current current) throws UserException { return dispatch(in); diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java b/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java index 1e9803ff774..0da5e67d431 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java @@ -695,7 +695,7 @@ public class InputStream if(encoding != null) { - encoding.ice_read(this); + encoding.read(this); _buf.b.position(_buf.b.position() - 6); } else @@ -2326,7 +2326,7 @@ public class InputStream // // Read the instance. // - v.__read(_stream); + v._iceRead(_stream); if(_patchMap != null) { @@ -2501,7 +2501,7 @@ public class InputStream // if(userEx != null) { - userEx.__read(_stream); + userEx._read(_stream); if(usesClasses) { readPendingValues(); @@ -2662,7 +2662,7 @@ public class InputStream // For the 1.0 encoding, the type ID for the base Object class // marks the last slice. // - if(_typeId.equals(Value.ice_staticId)) + if(_typeId.equals(Value.ice_staticId())) { throw new NoValueFactoryException("", mostDerivedId); } @@ -2806,7 +2806,7 @@ public class InputStream // if(userEx != null) { - userEx.__read(_stream); + userEx._read(_stream); throw userEx; // Never reached. @@ -3225,7 +3225,7 @@ public class InputStream // We pass the "::Ice::Object" ID to indicate that this is the // last chance to preserve the instance. // - v = newInstance(Value.ice_staticId); + v = newInstance(Value.ice_staticId()); if(v == null) { v = new UnknownSlicedValue(mostDerivedId); @@ -3285,7 +3285,7 @@ public class InputStream for(int j = 0; j < info.instances.length; ++j) { addPatchEntry(table[j], - new SequencePatcher<Value>(info.instances, Value.class, Value.ice_staticId, j)); + new SequencePatcher<Value>(info.instances, Value.class, Value.ice_staticId(), j)); } } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java b/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java index f3757a8817e..7a2cb5cc095 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java @@ -35,17 +35,17 @@ public class InterfaceByValue extends Value } @Override - protected void __writeImpl(OutputStream __os) + protected void _iceWriteImpl(OutputStream ostr) { - __os.startSlice(ice_id(), -1, true); - __os.endSlice(); + ostr.startSlice(ice_id(), -1, true); + ostr.endSlice(); } @Override - protected void __readImpl(InputStream __is) + protected void _iceReadImpl(InputStream istr) { - __is.startSlice(); - __is.endSlice(); + istr.startSlice(); + istr.endSlice(); } public static final long serialVersionUID = 0L; diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/Object.java b/java/src/Ice/src/main/java/com/zeroc/Ice/Object.java index 6c230280d72..3e8efe94934 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/Object.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/Object.java @@ -18,11 +18,9 @@ import com.zeroc.IceInternal.Incoming; **/ public interface Object { - public static final String ice_staticId = "::Ice::Object"; - - public final static String[] __ids = + final static String[] _iceIds = { - ice_staticId + "::Ice::Object" }; /** @@ -99,7 +97,7 @@ public interface Object **/ default String[] ice_ids(Current current) { - return __ids; + return _iceIds; } /** @@ -110,7 +108,7 @@ public interface Object **/ default String ice_id(Current current) { - return __ids[0]; + return ice_staticId(); } /** @@ -120,7 +118,7 @@ public interface Object **/ public static String ice_staticId() { - return ice_staticId; + return _iceIds[0]; } /** @@ -153,7 +151,7 @@ public interface Object return 0; } - final static String[] __ops = + final static String[] _iceOps = { "ice_id", "ice_ids", @@ -176,13 +174,13 @@ public interface Object { Incoming in = (Incoming)request; in.startOver(); - return __dispatch(in, in.getCurrent()); + return _iceDispatch(in, in.getCurrent()); } - default CompletionStage<OutputStream> __dispatch(Incoming in, Current current) + default CompletionStage<OutputStream> _iceDispatch(Incoming in, Current current) throws UserException { - int pos = java.util.Arrays.binarySearch(__ops, current.operation); + int pos = java.util.Arrays.binarySearch(_iceOps, current.operation); if(pos < 0) { throw new OperationNotExistException(current.id, current.facet, current.operation); @@ -192,19 +190,19 @@ public interface Object { case 0: { - return ___ice_id(this, in, current); + return _iceD_ice_id(this, in, current); } case 1: { - return ___ice_ids(this, in, current); + return _iceD_ice_ids(this, in, current); } case 2: { - return ___ice_isA(this, in, current); + return _iceD_ice_isA(this, in, current); } case 3: { - return ___ice_ping(this, in, current); + return _iceD_ice_ping(this, in, current); } } @@ -212,68 +210,68 @@ public interface Object throw new OperationNotExistException(current.id, current.facet, current.operation); } - default void __write(OutputStream __os) + default void _iceWrite(OutputStream ostr) { - __os.startValue(null); - __writeImpl(__os); - __os.endValue(); + ostr.startValue(null); + _iceWriteImpl(ostr); + ostr.endValue(); } - default void __writeImpl(OutputStream __os) + default void _iceWriteImpl(OutputStream ostr) { } - default void __read(InputStream __is) + default void _iceRead(InputStream istr) { - __is.startValue(); - __readImpl(__is); - __is.endValue(false); + istr.startValue(); + _iceReadImpl(istr); + istr.endValue(false); } - default void __readImpl(InputStream __is) + default void _iceReadImpl(InputStream istr) { } - static CompletionStage<OutputStream> ___ice_isA(Object __obj, Incoming __inS, Current __current) + static CompletionStage<OutputStream> _iceD_ice_isA(Object obj, Incoming inS, Current current) { - InputStream __is = __inS.startReadParams(); - String __id = __is.readString(); - __inS.endReadParams(); - boolean __ret = __obj.ice_isA(__id, __current); - OutputStream __os = __inS.startWriteParams(); - __os.writeBool(__ret); - __inS.endWriteParams(__os); - return __inS.setResult(__os); + InputStream istr = inS.startReadParams(); + String id = istr.readString(); + inS.endReadParams(); + boolean ret = obj.ice_isA(id, current); + OutputStream ostr = inS.startWriteParams(); + ostr.writeBool(ret); + inS.endWriteParams(ostr); + return inS.setResult(ostr); } - static CompletionStage<OutputStream> ___ice_ping(Object __obj, Incoming __inS, Current __current) + static CompletionStage<OutputStream> _iceD_ice_ping(Object obj, Incoming inS, Current current) { - __inS.readEmptyParams(); - __obj.ice_ping(__current); - return __inS.setResult(__inS.writeEmptyParams()); + inS.readEmptyParams(); + obj.ice_ping(current); + return inS.setResult(inS.writeEmptyParams()); } - static CompletionStage<OutputStream> ___ice_ids(Object __obj, Incoming __inS, Current __current) + static CompletionStage<OutputStream> _iceD_ice_ids(Object obj, Incoming inS, Current current) { - __inS.readEmptyParams(); - String[] __ret = __obj.ice_ids(__current); - OutputStream __os = __inS.startWriteParams(); - __os.writeStringSeq(__ret); - __inS.endWriteParams(__os); - return __inS.setResult(__os); + inS.readEmptyParams(); + String[] ret = obj.ice_ids(current); + OutputStream ostr = inS.startWriteParams(); + ostr.writeStringSeq(ret); + inS.endWriteParams(ostr); + return inS.setResult(ostr); } - static CompletionStage<OutputStream> ___ice_id(Object __obj, Incoming __inS, Current __current) + static CompletionStage<OutputStream> _iceD_ice_id(Object obj, Incoming inS, Current current) { - __inS.readEmptyParams(); - String __ret = __obj.ice_id(__current); - OutputStream __os = __inS.startWriteParams(); - __os.writeString(__ret); - __inS.endWriteParams(__os); - return __inS.setResult(__os); + inS.readEmptyParams(); + String ret = obj.ice_id(current); + OutputStream ostr = inS.startWriteParams(); + ostr.writeString(ret); + inS.endWriteParams(ostr); + return inS.setResult(ostr); } - static String __operationModeToString(OperationMode mode) + static String _iceOperationModeToString(OperationMode mode) { if(mode == OperationMode.Normal) { @@ -292,7 +290,7 @@ public interface Object return "???"; } - static void __checkMode(OperationMode expected, OperationMode received) + static void _iceCheckMode(OperationMode expected, OperationMode received) { if(expected == null) { @@ -312,8 +310,8 @@ public interface Object { MarshalException ex = new MarshalException(); ex.reason = "unexpected operation mode. expected = " - + __operationModeToString(expected) + " received = " - + __operationModeToString(received); + + _iceOperationModeToString(expected) + " received = " + + _iceOperationModeToString(received); throw ex; } } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectAdapterI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectAdapterI.java index 2ae50796171..1bbe0aa90e6 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectAdapterI.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectAdapterI.java @@ -517,7 +517,7 @@ public final class ObjectAdapterI implements ObjectAdapter { checkForDeactivation(); - com.zeroc.IceInternal.Reference ref = ((_ObjectPrxI)proxy).__reference(); + com.zeroc.IceInternal.Reference ref = ((_ObjectPrxI)proxy)._getReference(); return findFacet(ref.getIdentity(), ref.getFacet()); } @@ -673,7 +673,7 @@ public final class ObjectAdapterI implements ObjectAdapter // it can be called for AMI invocations if the proxy has no delegate set yet. // - com.zeroc.IceInternal.Reference ref = ((_ObjectPrxI)proxy).__reference(); + com.zeroc.IceInternal.Reference ref = ((_ObjectPrxI)proxy)._getReference(); if(ref.isWellKnown()) { // diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java index 22576393a9f..e28558dedf6 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java @@ -35,12 +35,12 @@ public interface ObjectPrx * Tests whether this object supports a specific Slice interface. * * @param id The type ID of the Slice interface to test against. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return <code>true</code> if the target object has the interface * specified by <code>id</code> or derives from the interface * specified by <code>id</code>. **/ - boolean ice_isA(String id, java.util.Map<String, String> __context); + boolean ice_isA(String id, java.util.Map<String, String> context); /** * Tests whether this object supports a specific Slice interface. @@ -54,10 +54,10 @@ public interface ObjectPrx * Tests whether this object supports a specific Slice interface. * * @param id The type ID of the Slice interface to test against. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return A future for the completion of the request. **/ - java.util.concurrent.CompletableFuture<Boolean> ice_isAAsync(String id, java.util.Map<String, String> __context); + java.util.concurrent.CompletableFuture<Boolean> ice_isAAsync(String id, java.util.Map<String, String> context); /** * Tests whether the target object of this proxy can be reached. @@ -67,9 +67,9 @@ public interface ObjectPrx /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. **/ - void ice_ping(java.util.Map<String, String> __context); + void ice_ping(java.util.Map<String, String> context); /** * Tests whether the target object of this proxy can be reached. @@ -81,10 +81,10 @@ public interface ObjectPrx /** * Tests whether the target object of this proxy can be reached. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return A future for the completion of the request. **/ - java.util.concurrent.CompletableFuture<Void> ice_pingAsync(java.util.Map<String, String> __context); + java.util.concurrent.CompletableFuture<Void> ice_pingAsync(java.util.Map<String, String> context); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. @@ -97,11 +97,11 @@ public interface ObjectPrx /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived * order. The first element of the returned array is always <code>::Ice::Object</code>. **/ - String[] ice_ids(java.util.Map<String, String> __context); + String[] ice_ids(java.util.Map<String, String> context); /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. @@ -113,10 +113,10 @@ public interface ObjectPrx /** * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return A future for the completion of the request. **/ - java.util.concurrent.CompletableFuture<String[]> ice_idsAsync(java.util.Map<String, String> __context); + java.util.concurrent.CompletableFuture<String[]> ice_idsAsync(java.util.Map<String, String> context); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. @@ -128,10 +128,10 @@ public interface ObjectPrx /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The Slice type ID of the most-derived interface. **/ - String ice_id(java.util.Map<String, String> __context); + String ice_id(java.util.Map<String, String> context); /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. @@ -143,10 +143,10 @@ public interface ObjectPrx /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. * - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return A future for the completion of the request. **/ - java.util.concurrent.CompletableFuture<String> ice_idAsync(java.util.Map<String, String> __context); + java.util.concurrent.CompletableFuture<String> ice_idAsync(java.util.Map<String, String> context); /** * Invokes an operation dynamically. @@ -167,14 +167,14 @@ public interface ObjectPrx * @param operation The name of the operation to invoke. * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return The results of the invocation. * * @see Blobject * @see OperationMode **/ com.zeroc.Ice.Object.Ice_invokeResult ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context); + java.util.Map<String, String> context); /** * Invokes an operation dynamically and asynchronously. @@ -199,7 +199,7 @@ public interface ObjectPrx * @param mode The operation mode (normal or idempotent). * @param inParams The encoded in-parameters for the operation. * for the operation. The return value follows any out-parameters. - * @param __context The context map for the invocation. + * @param context The context map for the invocation. * @return A future for the completion of the request. * * @see Blobject @@ -209,7 +209,7 @@ public interface ObjectPrx String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context); + java.util.Map<String, String> context); /** * Returns the identity embedded in this proxy. @@ -242,7 +242,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_context(java.util.Map<String, String> newContext) { - return __ice_context(newContext); + return _ice_context(newContext); } /** @@ -275,7 +275,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_adapterId(String newAdapterId) { - return __ice_adapterId(newAdapterId); + return _ice_adapterId(newAdapterId); } /** @@ -295,7 +295,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_endpoints(Endpoint[] newEndpoints) { - return __ice_endpoints(newEndpoints); + return _ice_endpoints(newEndpoints); } /** @@ -332,7 +332,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_locatorCacheTimeout(int newTimeout) { - return __ice_locatorCacheTimeout(newTimeout); + return _ice_locatorCacheTimeout(newTimeout); } /** @@ -344,7 +344,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_invocationTimeout(int newTimeout) { - return __ice_invocationTimeout(newTimeout); + return _ice_invocationTimeout(newTimeout); } /** @@ -362,7 +362,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_connectionCached(boolean newCache) { - return __ice_connectionCached(newCache); + return _ice_connectionCached(newCache); } /** @@ -384,7 +384,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_endpointSelection(EndpointSelectionType newType) { - return __ice_endpointSelection(newType); + return _ice_endpointSelection(newType); } /** @@ -404,7 +404,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_secure(boolean b) { - return __ice_secure(b); + return _ice_secure(b); } /** @@ -416,7 +416,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_encodingVersion(EncodingVersion e) { - return __ice_encodingVersion(e); + return _ice_encodingVersion(e); } /** @@ -444,7 +444,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_preferSecure(boolean b) { - return __ice_preferSecure(b); + return _ice_preferSecure(b); } /** @@ -463,7 +463,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_router(RouterPrx router) { - return __ice_router(router); + return _ice_router(router); } /** @@ -481,7 +481,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_locator(LocatorPrx locator) { - return __ice_locator(locator); + return _ice_locator(locator); } /** @@ -499,7 +499,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_collocationOptimized(boolean b) { - return __ice_collocationOptimized(b); + return _ice_collocationOptimized(b); } /** @@ -509,7 +509,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_twoway() { - return __ice_twoway(); + return _ice_twoway(); } /** @@ -525,7 +525,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_oneway() { - return __ice_oneway(); + return _ice_oneway(); } /** @@ -541,7 +541,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_batchOneway() { - return __ice_batchOneway(); + return _ice_batchOneway(); } /** @@ -557,7 +557,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_datagram() { - return __ice_datagram(); + return _ice_datagram(); } /** @@ -573,7 +573,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_batchDatagram() { - return __ice_batchDatagram(); + return _ice_batchDatagram(); } /** @@ -590,7 +590,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_compress(boolean co) { - return __ice_compress(co); + return _ice_compress(co); } /** @@ -601,7 +601,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_timeout(int t) { - return __ice_timeout(t); + return _ice_timeout(t); } /** @@ -614,7 +614,7 @@ public interface ObjectPrx **/ default ObjectPrx ice_connectionId(String connectionId) { - return __ice_connectionId(connectionId); + return _ice_connectionId(connectionId); } /** @@ -687,12 +687,12 @@ public interface ObjectPrx * the server and will throw an Ice run-time exception if the target * object does not exist or the server cannot be reached. * - * @param __obj The proxy to cast to @{link ObjectPrx}. - * @return <code>__obj</code>. + * @param obj The proxy to cast to @{link ObjectPrx}. + * @return <code>obj</code>. **/ - static ObjectPrx checkedCast(ObjectPrx __obj) + static ObjectPrx checkedCast(ObjectPrx obj) { - return __obj; + return obj; } /** @@ -700,13 +700,13 @@ public interface ObjectPrx * the server and throws an Ice run-time exception if the target * object does not exist or the server cannot be reached. * - * @param __obj The proxy to cast to {@link ObjectPrx}. - * @param __ctx The <code>Context</code> map for the invocation. - * @return <code>__obj</code>. + * @param obj The proxy to cast to {@link ObjectPrx}. + * @param context The <code>Context</code> map for the invocation. + * @return <code>obj</code>. **/ - static ObjectPrx checkedCast(ObjectPrx __obj, java.util.Map<String, String> __ctx) + static ObjectPrx checkedCast(ObjectPrx obj, java.util.Map<String, String> context) { - return __obj; + return obj; } /** @@ -715,13 +715,13 @@ public interface ObjectPrx * the server and throws an Ice run-time exception if the target * object does not exist, the specified facet does not exist, or the server cannot be reached. * - * @param __obj The proxy to cast to {@link ObjectPrx}. - * @param __facet The facet for the new proxy. + * @param obj The proxy to cast to {@link ObjectPrx}. + * @param facet The facet for the new proxy. * @return The new proxy with the specified facet. **/ - static ObjectPrx checkedCast(ObjectPrx __obj, String __facet) + static ObjectPrx checkedCast(ObjectPrx obj, String facet) { - return checkedCast(__obj, __facet, noExplicitContext); + return checkedCast(obj, facet, noExplicitContext); } /** @@ -730,23 +730,23 @@ public interface ObjectPrx * the server and throws an Ice run-time exception if the target * object does not exist, the specified facet does not exist, or the server cannot be reached. * - * @param __obj The proxy to cast to {@link ObjectPrx}. - * @param __facet The facet for the new proxy. - * @param __ctx The <code>Context</code> map for the invocation. + * @param obj The proxy to cast to {@link ObjectPrx}. + * @param facet The facet for the new proxy. + * @param context The <code>Context</code> map for the invocation. * @return The new proxy with the specified facet. **/ - static ObjectPrx checkedCast(ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx) + static ObjectPrx checkedCast(ObjectPrx obj, String facet, java.util.Map<String, String> context) { ObjectPrx r = null; - if(__obj != null) + if(obj != null) { - ObjectPrx p = __obj.ice_facet(__facet); + ObjectPrx p = obj.ice_facet(facet); try { - boolean ok = p.ice_isA(ice_staticId, __ctx); + boolean ok = p.ice_isA(ice_staticId, context); assert(ok); r = new _ObjectPrxI(); - r.__copyFrom(p); + r._copyFrom(p); } catch(FacetNotExistException ex) { @@ -759,30 +759,30 @@ public interface ObjectPrx * Casts a proxy to {@link ObjectPrx}. This call does * not contact the server and always succeeds. * - * @param __obj The proxy to cast to {@link ObjectPrx}. - * @return <code>__obj</code>. + * @param obj The proxy to cast to {@link ObjectPrx}. + * @return <code>obj</code>. **/ - static ObjectPrx uncheckedCast(ObjectPrx __obj) + static ObjectPrx uncheckedCast(ObjectPrx obj) { - return __obj; + return obj; } /** * Creates a new proxy that is identical to the passed proxy, except * for its facet. This call does not contact the server and always succeeds. * - * @param __obj The proxy to cast to {@link ObjectPrx}. - * @param __facet The facet for the new proxy. + * @param obj The proxy to cast to {@link ObjectPrx}. + * @param facet The facet for the new proxy. * @return The new proxy with the specified facet. **/ - static ObjectPrx uncheckedCast(ObjectPrx __obj, String __facet) + static ObjectPrx uncheckedCast(ObjectPrx obj, String facet) { ObjectPrx r = null; - if(__obj != null) + if(obj != null) { - ObjectPrx p = __obj.ice_facet(__facet); + ObjectPrx p = obj.ice_facet(facet); r = new _ObjectPrxI(); - r.__copyFrom(p); + r._copyFrom(p); } return r; } @@ -809,29 +809,29 @@ public interface ObjectPrx return istr.readProxy(); } - static <T> T __checkedCast(ObjectPrx obj, String id, Class<T> proxy, Class<?> impl) + static <T> T _checkedCast(ObjectPrx obj, String id, Class<T> proxy, Class<?> impl) { - return __checkedCast(obj, false, null, noExplicitContext, id, proxy, impl); + return _checkedCast(obj, false, null, noExplicitContext, id, proxy, impl); } - static <T> T __checkedCast(ObjectPrx obj, java.util.Map<String, String> ctx, String id, Class<T> proxy, + static <T> T _checkedCast(ObjectPrx obj, java.util.Map<String, String> ctx, String id, Class<T> proxy, Class<?> impl) { - return __checkedCast(obj, false, null, ctx, id, proxy, impl); + return _checkedCast(obj, false, null, ctx, id, proxy, impl); } - static <T> T __checkedCast(ObjectPrx obj, String facet, String id, Class<T> proxy, Class<?> impl) + static <T> T _checkedCast(ObjectPrx obj, String facet, String id, Class<T> proxy, Class<?> impl) { - return __checkedCast(obj, true, facet, noExplicitContext, id, proxy, impl); + return _checkedCast(obj, true, facet, noExplicitContext, id, proxy, impl); } - static <T> T __checkedCast(ObjectPrx obj, String facet, java.util.Map<String, String> ctx, String id, + static <T> T _checkedCast(ObjectPrx obj, String facet, java.util.Map<String, String> ctx, String id, Class<T> proxy, Class<?> impl) { - return __checkedCast(obj, true, facet, ctx, id, proxy, impl); + return _checkedCast(obj, true, facet, ctx, id, proxy, impl); } - static <T> T __checkedCast(ObjectPrx obj, boolean explicitFacet, String facet, java.util.Map<String, String> ctx, + static <T> T _checkedCast(ObjectPrx obj, boolean explicitFacet, String facet, java.util.Map<String, String> ctx, String id, Class<T> proxy, Class<?> impl) { T r = null; @@ -865,7 +865,7 @@ public interface ObjectPrx { throw new SyscallException(ex); } - h.__copyFrom(obj); + h._copyFrom(obj); r = proxy.cast(h); } } @@ -877,17 +877,17 @@ public interface ObjectPrx return r; } - static <T> T __uncheckedCast(ObjectPrx obj, Class<T> proxy, Class<?> impl) + static <T> T _uncheckedCast(ObjectPrx obj, Class<T> proxy, Class<?> impl) { - return __uncheckedCast(obj, false, null, proxy, impl); + return _uncheckedCast(obj, false, null, proxy, impl); } - static <T> T __uncheckedCast(ObjectPrx obj, String facet, Class<T> proxy, Class<?> impl) + static <T> T _uncheckedCast(ObjectPrx obj, String facet, Class<T> proxy, Class<?> impl) { - return __uncheckedCast(obj, true, facet, proxy, impl); + return _uncheckedCast(obj, true, facet, proxy, impl); } - static <T> T __uncheckedCast(ObjectPrx obj, boolean explicitFacet, String facet, Class<T> proxy, Class<?> impl) + static <T> T _uncheckedCast(ObjectPrx obj, boolean explicitFacet, String facet, Class<T> proxy, Class<?> impl) { T r = null; if(obj != null) @@ -897,7 +897,7 @@ public interface ObjectPrx if(explicitFacet) { ObjectPrx h = _ObjectPrxI.class.cast(impl.newInstance()); - h.__copyFrom(obj.ice_facet(facet)); + h._copyFrom(obj.ice_facet(facet)); r = proxy.cast(h); } else @@ -909,7 +909,7 @@ public interface ObjectPrx else { ObjectPrx h = _ObjectPrxI.class.cast(impl.newInstance()); - h.__copyFrom(obj); + h._copyFrom(obj); r = proxy.cast(h); } } @@ -926,11 +926,11 @@ public interface ObjectPrx return r; } - static <T> T __waitForCompletion(java.util.concurrent.CompletableFuture<T> f) + static <T> T waitForResponseForCompletion(java.util.concurrent.CompletableFuture<T> f) { try { - return __waitForCompletionUserEx(f); + return waitForResponseForCompletionUserEx(f); } catch(UserException ex) { @@ -938,7 +938,7 @@ public interface ObjectPrx } } - static <T> T __waitForCompletionUserEx(java.util.concurrent.CompletableFuture<T> f) + static <T> T waitForResponseForCompletionUserEx(java.util.concurrent.CompletableFuture<T> f) throws UserException { if(Thread.interrupted()) @@ -975,36 +975,36 @@ public interface ObjectPrx } } - void __write(OutputStream os); - void __copyFrom(ObjectPrx p); - com.zeroc.IceInternal.Reference __reference(); - ObjectPrx __newInstance(com.zeroc.IceInternal.Reference r); + void _write(OutputStream os); + void _copyFrom(ObjectPrx p); + com.zeroc.IceInternal.Reference _getReference(); + ObjectPrx _newInstance(com.zeroc.IceInternal.Reference r); - default ObjectPrx __ice_context(java.util.Map<String, String> newContext) + default ObjectPrx _ice_context(java.util.Map<String, String> newContext) { - return __newInstance(__reference().changeContext(newContext)); + return _newInstance(_getReference().changeContext(newContext)); } - default ObjectPrx __ice_adapterId(String newAdapterId) + default ObjectPrx _ice_adapterId(String newAdapterId) { if(newAdapterId == null) { newAdapterId = ""; } - if(newAdapterId.equals(__reference().getAdapterId())) + if(newAdapterId.equals(_getReference().getAdapterId())) { return this; } else { - return __newInstance(__reference().changeAdapterId(newAdapterId)); + return _newInstance(_getReference().changeAdapterId(newAdapterId)); } } - default ObjectPrx __ice_endpoints(Endpoint[] newEndpoints) + default ObjectPrx _ice_endpoints(Endpoint[] newEndpoints) { - if(java.util.Arrays.equals(newEndpoints, __reference().getEndpoints())) + if(java.util.Arrays.equals(newEndpoints, _getReference().getEndpoints())) { return this; } @@ -1012,240 +1012,240 @@ public interface ObjectPrx { com.zeroc.IceInternal.EndpointI[] edpts = new com.zeroc.IceInternal.EndpointI[newEndpoints.length]; edpts = java.util.Arrays.asList(newEndpoints).toArray(edpts); - return __newInstance(__reference().changeEndpoints(edpts)); + return _newInstance(_getReference().changeEndpoints(edpts)); } } - default ObjectPrx __ice_locatorCacheTimeout(int newTimeout) + default ObjectPrx _ice_locatorCacheTimeout(int newTimeout) { if(newTimeout < -1) { throw new IllegalArgumentException("invalid value passed to ice_locatorCacheTimeout: " + newTimeout); } - if(newTimeout == __reference().getLocatorCacheTimeout()) + if(newTimeout == _getReference().getLocatorCacheTimeout()) { return this; } else { - return __newInstance(__reference().changeLocatorCacheTimeout(newTimeout)); + return _newInstance(_getReference().changeLocatorCacheTimeout(newTimeout)); } } - default ObjectPrx __ice_invocationTimeout(int newTimeout) + default ObjectPrx _ice_invocationTimeout(int newTimeout) { if(newTimeout < 1 && newTimeout != -1 && newTimeout != -2) { throw new IllegalArgumentException("invalid value passed to ice_invocationTimeout: " + newTimeout); } - if(newTimeout == __reference().getInvocationTimeout()) + if(newTimeout == _getReference().getInvocationTimeout()) { return this; } else { - return __newInstance(__reference().changeInvocationTimeout(newTimeout)); + return _newInstance(_getReference().changeInvocationTimeout(newTimeout)); } } - default ObjectPrx __ice_connectionCached(boolean newCache) + default ObjectPrx _ice_connectionCached(boolean newCache) { - if(newCache == __reference().getCacheConnection()) + if(newCache == _getReference().getCacheConnection()) { return this; } else { - return __newInstance(__reference().changeCacheConnection(newCache)); + return _newInstance(_getReference().changeCacheConnection(newCache)); } } - default ObjectPrx __ice_endpointSelection(EndpointSelectionType newType) + default ObjectPrx _ice_endpointSelection(EndpointSelectionType newType) { - if(newType == __reference().getEndpointSelection()) + if(newType == _getReference().getEndpointSelection()) { return this; } else { - return __newInstance(__reference().changeEndpointSelection(newType)); + return _newInstance(_getReference().changeEndpointSelection(newType)); } } - default ObjectPrx __ice_secure(boolean b) + default ObjectPrx _ice_secure(boolean b) { - if(b == __reference().getSecure()) + if(b == _getReference().getSecure()) { return this; } else { - return __newInstance(__reference().changeSecure(b)); + return _newInstance(_getReference().changeSecure(b)); } } - default ObjectPrx __ice_encodingVersion(EncodingVersion e) + default ObjectPrx _ice_encodingVersion(EncodingVersion e) { - if(e.equals(__reference().getEncoding())) + if(e.equals(_getReference().getEncoding())) { return this; } else { - return __newInstance(__reference().changeEncoding(e)); + return _newInstance(_getReference().changeEncoding(e)); } } - default ObjectPrx __ice_preferSecure(boolean b) + default ObjectPrx _ice_preferSecure(boolean b) { - if(b == __reference().getPreferSecure()) + if(b == _getReference().getPreferSecure()) { return this; } else { - return __newInstance(__reference().changePreferSecure(b)); + return _newInstance(_getReference().changePreferSecure(b)); } } - default ObjectPrx __ice_router(RouterPrx router) + default ObjectPrx _ice_router(RouterPrx router) { - com.zeroc.IceInternal.Reference ref = __reference().changeRouter(router); - if(ref.equals(__reference())) + com.zeroc.IceInternal.Reference ref = _getReference().changeRouter(router); + if(ref.equals(_getReference())) { return this; } else { - return __newInstance(ref); + return _newInstance(ref); } } - default ObjectPrx __ice_locator(LocatorPrx locator) + default ObjectPrx _ice_locator(LocatorPrx locator) { - com.zeroc.IceInternal.Reference ref = __reference().changeLocator(locator); - if(ref.equals(__reference())) + com.zeroc.IceInternal.Reference ref = _getReference().changeLocator(locator); + if(ref.equals(_getReference())) { return this; } else { - return __newInstance(ref); + return _newInstance(ref); } } - default ObjectPrx __ice_collocationOptimized(boolean b) + default ObjectPrx _ice_collocationOptimized(boolean b) { - if(b == __reference().getCollocationOptimized()) + if(b == _getReference().getCollocationOptimized()) { return this; } else { - return __newInstance(__reference().changeCollocationOptimized(b)); + return _newInstance(_getReference().changeCollocationOptimized(b)); } } - default ObjectPrx __ice_twoway() + default ObjectPrx _ice_twoway() { - if(__reference().getMode() == com.zeroc.IceInternal.Reference.ModeTwoway) + if(_getReference().getMode() == com.zeroc.IceInternal.Reference.ModeTwoway) { return this; } else { - return __newInstance(__reference().changeMode(com.zeroc.IceInternal.Reference.ModeTwoway)); + return _newInstance(_getReference().changeMode(com.zeroc.IceInternal.Reference.ModeTwoway)); } } - default ObjectPrx __ice_oneway() + default ObjectPrx _ice_oneway() { - if(__reference().getMode() == com.zeroc.IceInternal.Reference.ModeOneway) + if(_getReference().getMode() == com.zeroc.IceInternal.Reference.ModeOneway) { return this; } else { - return __newInstance(__reference().changeMode(com.zeroc.IceInternal.Reference.ModeOneway)); + return _newInstance(_getReference().changeMode(com.zeroc.IceInternal.Reference.ModeOneway)); } } - default ObjectPrx __ice_batchOneway() + default ObjectPrx _ice_batchOneway() { - if(__reference().getMode() == com.zeroc.IceInternal.Reference.ModeBatchOneway) + if(_getReference().getMode() == com.zeroc.IceInternal.Reference.ModeBatchOneway) { return this; } else { - return __newInstance(__reference().changeMode(com.zeroc.IceInternal.Reference.ModeBatchOneway)); + return _newInstance(_getReference().changeMode(com.zeroc.IceInternal.Reference.ModeBatchOneway)); } } - default ObjectPrx __ice_datagram() + default ObjectPrx _ice_datagram() { - if(__reference().getMode() == com.zeroc.IceInternal.Reference.ModeDatagram) + if(_getReference().getMode() == com.zeroc.IceInternal.Reference.ModeDatagram) { return this; } else { - return __newInstance(__reference().changeMode(com.zeroc.IceInternal.Reference.ModeDatagram)); + return _newInstance(_getReference().changeMode(com.zeroc.IceInternal.Reference.ModeDatagram)); } } - default ObjectPrx __ice_batchDatagram() + default ObjectPrx _ice_batchDatagram() { - if(__reference().getMode() == com.zeroc.IceInternal.Reference.ModeBatchDatagram) + if(_getReference().getMode() == com.zeroc.IceInternal.Reference.ModeBatchDatagram) { return this; } else { - return __newInstance(__reference().changeMode(com.zeroc.IceInternal.Reference.ModeBatchDatagram)); + return _newInstance(_getReference().changeMode(com.zeroc.IceInternal.Reference.ModeBatchDatagram)); } } - default ObjectPrx __ice_compress(boolean co) + default ObjectPrx _ice_compress(boolean co) { - com.zeroc.IceInternal.Reference ref = __reference().changeCompress(co); - if(ref.equals(__reference())) + com.zeroc.IceInternal.Reference ref = _getReference().changeCompress(co); + if(ref.equals(_getReference())) { return this; } else { - return __newInstance(ref); + return _newInstance(ref); } } - default ObjectPrx __ice_timeout(int t) + default ObjectPrx _ice_timeout(int t) { if(t < 1 && t != -1) { throw new IllegalArgumentException("invalid value passed to ice_timeout: " + t); } - com.zeroc.IceInternal.Reference ref = __reference().changeTimeout(t); - if(ref.equals(__reference())) + com.zeroc.IceInternal.Reference ref = _getReference().changeTimeout(t); + if(ref.equals(_getReference())) { return this; } else { - return __newInstance(ref); + return _newInstance(ref); } } - default ObjectPrx __ice_connectionId(String connectionId) + default ObjectPrx _ice_connectionId(String connectionId) { - com.zeroc.IceInternal.Reference ref = __reference().changeConnectionId(connectionId); - if(ref.equals(__reference())) + com.zeroc.IceInternal.Reference ref = _getReference().changeConnectionId(connectionId); + if(ref.equals(_getReference())) { return this; } else { - return __newInstance(ref); + return _newInstance(ref); } } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/OutputStream.java b/java/src/Ice/src/main/java/com/zeroc/Ice/OutputStream.java index 5d3f5adfb01..4df391c80ce 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/OutputStream.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/OutputStream.java @@ -387,7 +387,7 @@ public class OutputStream _encapsStack.start = _buf.size(); writeInt(0); // Placeholder for the encapsulation length. - _encapsStack.encoding.ice_write(this); + _encapsStack.encoding.write(this); } /** @@ -418,7 +418,7 @@ public class OutputStream { com.zeroc.IceInternal.Protocol.checkSupportedEncoding(encoding); writeInt(6); // Size - encoding.ice_write(this); + encoding.write(this); } /** @@ -1574,12 +1574,12 @@ public class OutputStream { if(v != null) { - v.__write(this); + v._write(this); } else { Identity ident = new Identity(); - ident.ice_write(this); + ident.write(this); } } @@ -1867,9 +1867,9 @@ public class OutputStream // This allows reading the pending instances even if some part of // the exception was sliced. // - boolean usesClasses = v.__usesClasses(); + boolean usesClasses = v._usesClasses(); _stream.writeBool(usesClasses); - v.__write(_stream); + v._write(_stream); if(usesClasses) { writePendingValues(); @@ -1890,7 +1890,7 @@ public class OutputStream // // Write the Object slice. // - startSlice(Value.ice_staticId, -1, true); + startSlice(Value.ice_staticId(), -1, true); _stream.writeSize(0); // For compatibility with the old AFM. endSlice(); } @@ -1974,7 +1974,7 @@ public class OutputStream _stream.instance().initializationData().logger.warning(s); } - p.getKey().__write(_stream); + p.getKey()._iceWrite(_stream); } } _stream.writeSize(0); // Zero marker indicates end of sequence of sequences of instances. @@ -2074,7 +2074,7 @@ public class OutputStream @Override void writeException(UserException v) { - v.__write(_stream); + v._write(_stream); } @Override @@ -2321,7 +2321,7 @@ public class OutputStream } _stream.writeSize(1); // Class instance marker. - v.__write(_stream); + v._iceWrite(_stream); } private static final class InstanceData diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/UnknownSlicedValue.java b/java/src/Ice/src/main/java/com/zeroc/Ice/UnknownSlicedValue.java index 39e606cc2ee..18734abb867 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/UnknownSlicedValue.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/UnknownSlicedValue.java @@ -35,17 +35,17 @@ public final class UnknownSlicedValue extends Value } @Override - public void __write(OutputStream __os) + public void _iceWrite(OutputStream ostr) { - __os.startValue(_slicedData); - __os.endValue(); + ostr.startValue(_slicedData); + ostr.endValue(); } @Override - public void __read(InputStream __is) + public void _iceRead(InputStream istr) { - __is.startValue(); - _slicedData = __is.endValue(true); + istr.startValue(); + _slicedData = istr.endValue(true); } private final String _unknownTypeId; diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/UserException.java b/java/src/Ice/src/main/java/com/zeroc/Ice/UserException.java index 388cd92111a..88479216740 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/UserException.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/UserException.java @@ -83,28 +83,28 @@ public abstract class UserException extends java.lang.Exception implements Clone return sw.toString(); } - public void __write(OutputStream os) + public void _write(OutputStream os) { os.startException(null); - __writeImpl(os); + _writeImpl(os); os.endException(); } - public void __read(InputStream is) + public void _read(InputStream is) { is.startException(); - __readImpl(is); + _readImpl(is); is.endException(false); } - public boolean __usesClasses() + public boolean _usesClasses() { return false; } - protected abstract void __writeImpl(OutputStream os); + protected abstract void _writeImpl(OutputStream os); - protected abstract void __readImpl(InputStream is); + protected abstract void _readImpl(InputStream is); public static final long serialVersionUID = 0L; } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/Value.java b/java/src/Ice/src/main/java/com/zeroc/Ice/Value.java index 7b1c64781f8..362ff7d9414 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/Value.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/Value.java @@ -52,8 +52,6 @@ public abstract class Value implements java.lang.Cloneable, java.io.Serializable { } - public static final String ice_staticId = "::Ice::Object"; - /** * Returns the Slice type ID of the most-derived interface supported by this object. * @@ -61,28 +59,33 @@ public abstract class Value implements java.lang.Cloneable, java.io.Serializable **/ public String ice_id() { - return ice_staticId; + return ice_staticId(); + } + + public static String ice_staticId() + { + return "::Ice::Object"; } - public void __write(OutputStream __os) + public void _iceWrite(OutputStream ostr) { - __os.startValue(null); - __writeImpl(__os); - __os.endValue(); + ostr.startValue(null); + _iceWriteImpl(ostr); + ostr.endValue(); } - public void __read(InputStream __is) + public void _iceRead(InputStream istr) { - __is.startValue(); - __readImpl(__is); - __is.endValue(false); + istr.startValue(); + _iceReadImpl(istr); + istr.endValue(false); } - protected void __writeImpl(OutputStream __os) + protected void _iceWriteImpl(OutputStream ostr) { } - protected void __readImpl(InputStream __is) + protected void _iceReadImpl(InputStream istr) { } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ValueReader.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ValueReader.java index 90dbdd46cb6..d56a2a634fb 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ValueReader.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ValueReader.java @@ -22,13 +22,13 @@ public abstract class ValueReader extends Value public abstract void read(InputStream in); @Override - public void __write(OutputStream os) + public void _iceWrite(OutputStream os) { assert(false); } @Override - public void __read(InputStream is) + public void _iceRead(InputStream is) { read(is); } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ValueWriter.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ValueWriter.java index 89860e8bedf..f232a1dcb28 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ValueWriter.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ValueWriter.java @@ -22,13 +22,13 @@ public abstract class ValueWriter extends Value public abstract void write(OutputStream out); @Override - public void __write(OutputStream os) + public void _iceWrite(OutputStream os) { write(os); } @Override - public void __read(InputStream is) + public void _iceRead(InputStream is) { assert(false); } diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java index 10af97bb35a..322257dbd1d 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java @@ -29,38 +29,38 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return ice_isA(id, ObjectPrx.noExplicitContext); } - public boolean ice_isA(String id, java.util.Map<String, String> __ctx) + public boolean ice_isA(String id, java.util.Map<String, String> context) { - return __ice_isAAsync(id, __ctx, true).__wait(); + return _iceI_ice_isAAsync(id, context, true).waitForResponse(); } public java.util.concurrent.CompletableFuture<java.lang.Boolean> ice_isAAsync(String id) { - return __ice_isAAsync(id, ObjectPrx.noExplicitContext, false); + return _iceI_ice_isAAsync(id, ObjectPrx.noExplicitContext, false); } public java.util.concurrent.CompletableFuture<java.lang.Boolean> ice_isAAsync( String id, - java.util.Map<String, String> __ctx) + java.util.Map<String, String> context) { - return __ice_isAAsync(id, __ctx, false); + return _iceI_ice_isAAsync(id, context, false); } - private OutgoingAsync<java.lang.Boolean> __ice_isAAsync( + private OutgoingAsync<java.lang.Boolean> _iceI_ice_isAAsync( String id, - java.util.Map<String, String> __ctx, - boolean __sync) - { - OutgoingAsync<java.lang.Boolean> __f = - new OutgoingAsync<>(this, "ice_isA", OperationMode.Nonmutating, __sync, null); - __f.invoke(true, __ctx, null, __os -> { - __os.writeString(id); - }, __is -> { - boolean __ret; - __ret = __is.readBool(); - return __ret; + java.util.Map<String, String> context, + boolean sync) + { + OutgoingAsync<java.lang.Boolean> f = + new OutgoingAsync<>(this, "ice_isA", OperationMode.Nonmutating, sync, null); + f.invoke(true, context, null, ostr -> { + ostr.writeString(id); + }, istr -> { + boolean ret; + ret = istr.readBool(); + return ret; }); - return __f; + return f; } public void ice_ping() @@ -68,28 +68,28 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable ice_ping(ObjectPrx.noExplicitContext); } - public void ice_ping(java.util.Map<String, String> __ctx) + public void ice_ping(java.util.Map<String, String> context) { - __ice_pingAsync(__ctx, true).__wait(); + _iceI_ice_pingAsync(context, true).waitForResponse(); } public java.util.concurrent.CompletableFuture<Void> ice_pingAsync() { - return __ice_pingAsync(ObjectPrx.noExplicitContext, false); + return _iceI_ice_pingAsync(ObjectPrx.noExplicitContext, false); } - public java.util.concurrent.CompletableFuture<Void> ice_pingAsync(java.util.Map<String, String> __ctx) + public java.util.concurrent.CompletableFuture<Void> ice_pingAsync(java.util.Map<String, String> context) { - return __ice_pingAsync(__ctx, false); + return _iceI_ice_pingAsync(context, false); } - private OutgoingAsync<Void> __ice_pingAsync( - java.util.Map<String, String> __ctx, - boolean __sync) + private OutgoingAsync<Void> _iceI_ice_pingAsync( + java.util.Map<String, String> context, + boolean sync) { - OutgoingAsync<Void> __f = new OutgoingAsync<>(this, "ice_ping", OperationMode.Nonmutating, __sync, null); - __f.invoke(false, __ctx, null, null, null); - return __f; + OutgoingAsync<Void> f = new OutgoingAsync<>(this, "ice_ping", OperationMode.Nonmutating, sync, null); + f.invoke(false, context, null, null, null); + return f; } public String[] ice_ids() @@ -97,33 +97,33 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return ice_ids(ObjectPrx.noExplicitContext); } - public String[] ice_ids(java.util.Map<String, String> __ctx) + public String[] ice_ids(java.util.Map<String, String> context) { - return __ice_idsAsync(__ctx, true).__wait(); + return _iceI_ice_idsAsync(context, true).waitForResponse(); } public java.util.concurrent.CompletableFuture<String[]> ice_idsAsync() { - return __ice_idsAsync(ObjectPrx.noExplicitContext, false); + return _iceI_ice_idsAsync(ObjectPrx.noExplicitContext, false); } - public java.util.concurrent.CompletableFuture<String[]> ice_idsAsync(java.util.Map<String, String> __ctx) + public java.util.concurrent.CompletableFuture<String[]> ice_idsAsync(java.util.Map<String, String> context) { - return __ice_idsAsync(__ctx, false); + return _iceI_ice_idsAsync(context, false); } - private OutgoingAsync<String[]> __ice_idsAsync( - java.util.Map<String, String> __ctx, - boolean __sync) + private OutgoingAsync<String[]> _iceI_ice_idsAsync( + java.util.Map<String, String> context, + boolean sync) { - OutgoingAsync<String[]> __f = - new OutgoingAsync<>(this, "ice_ids", OperationMode.Nonmutating, __sync, null); - __f.invoke(true, __ctx, null, null, __is -> { - String[] __ret; - __ret = StringSeqHelper.read(__is); - return __ret; + OutgoingAsync<String[]> f = + new OutgoingAsync<>(this, "ice_ids", OperationMode.Nonmutating, sync, null); + f.invoke(true, context, null, null, istr -> { + String[] ret; + ret = StringSeqHelper.read(istr); + return ret; }); - return __f; + return f; } public String ice_id() @@ -131,33 +131,33 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return ice_id(ObjectPrx.noExplicitContext); } - public String ice_id(java.util.Map<String, String> __ctx) + public String ice_id(java.util.Map<String, String> context) { - return __ice_idAsync(__ctx, true).__wait(); + return _iceI_ice_idAsync(context, true).waitForResponse(); } public java.util.concurrent.CompletableFuture<java.lang.String> ice_idAsync() { - return __ice_idAsync(ObjectPrx.noExplicitContext, false); + return _iceI_ice_idAsync(ObjectPrx.noExplicitContext, false); } - public java.util.concurrent.CompletableFuture<java.lang.String> ice_idAsync(java.util.Map<String, String> __ctx) + public java.util.concurrent.CompletableFuture<java.lang.String> ice_idAsync(java.util.Map<String, String> context) { - return __ice_idAsync(__ctx, false); + return _iceI_ice_idAsync(context, false); } - private OutgoingAsync<java.lang.String> __ice_idAsync( - java.util.Map<String, String> __ctx, - boolean __sync) + private OutgoingAsync<java.lang.String> _iceI_ice_idAsync( + java.util.Map<String, String> context, + boolean sync) { - OutgoingAsync<java.lang.String> __f = - new OutgoingAsync<>(this, "ice_id", OperationMode.Nonmutating, __sync, null); - __f.invoke(true, __ctx, null, null, __is -> { - String __ret; - __ret = __is.readString(); - return __ret; + OutgoingAsync<java.lang.String> f = + new OutgoingAsync<>(this, "ice_id", OperationMode.Nonmutating, sync, null); + f.invoke(true, context, null, null, istr -> { + String ret; + ret = istr.readString(); + return ret; }); - return __f; + return f; } public com.zeroc.Ice.Object.Ice_invokeResult ice_invoke(String operation, OperationMode mode, byte[] inParams) @@ -166,9 +166,9 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable } public com.zeroc.Ice.Object.Ice_invokeResult ice_invoke(String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context) + java.util.Map<String, String> context) { - return __ice_invokeAsync(operation, mode, inParams, __context, true).__wait(); + return _iceI_ice_invokeAsync(operation, mode, inParams, context, true).waitForResponse(); } public java.util.concurrent.CompletableFuture<com.zeroc.Ice.Object.Ice_invokeResult> ice_invokeAsync( @@ -183,22 +183,22 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context) + java.util.Map<String, String> context) { - return __ice_invokeAsync(operation, mode, inParams, __context, false); + return _iceI_ice_invokeAsync(operation, mode, inParams, context, false); } - private com.zeroc.IceInternal.ProxyIceInvoke __ice_invokeAsync( + private com.zeroc.IceInternal.ProxyIceInvoke _iceI_ice_invokeAsync( String operation, OperationMode mode, byte[] inParams, - java.util.Map<String, String> __context, - boolean __sync) + java.util.Map<String, String> context, + boolean sync) { - com.zeroc.IceInternal.ProxyIceInvoke __f = - new com.zeroc.IceInternal.ProxyIceInvoke(this, operation, mode, __sync); - __f.invoke(inParams, __context); - return __f; + com.zeroc.IceInternal.ProxyIceInvoke f = + new com.zeroc.IceInternal.ProxyIceInvoke(this, operation, mode, sync); + f.invoke(inParams, context); + return f; } public Identity ice_getIdentity() @@ -219,7 +219,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable else { _ObjectPrxI proxy = new _ObjectPrxI(); - proxy.__setup(_reference.changeIdentity(newIdentity)); + proxy._setup(_reference.changeIdentity(newIdentity)); return proxy; } } @@ -248,7 +248,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable else { _ObjectPrxI proxy = new _ObjectPrxI(); - proxy.__setup(_reference.changeFacet(newFacet)); + proxy._setup(_reference.changeFacet(newFacet)); return proxy; } } @@ -347,15 +347,15 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable public Connection ice_getConnection() { - return __ice_getConnectionAsync().__wait(); + return _iceI_ice_getConnectionAsync().waitForResponse(); } public java.util.concurrent.CompletableFuture<Connection> ice_getConnectionAsync() { - return __ice_getConnectionAsync(); + return _iceI_ice_getConnectionAsync(); } - private com.zeroc.IceInternal.ProxyGetConnection __ice_getConnectionAsync() + private com.zeroc.IceInternal.ProxyGetConnection _iceI_ice_getConnectionAsync() { com.zeroc.IceInternal.ProxyGetConnection r = new com.zeroc.IceInternal.ProxyGetConnection(this); r.invoke(); @@ -385,26 +385,26 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable public void ice_flushBatchRequests() { - __ice_flushBatchRequestsAsync().__wait(); + _iceI_ice_flushBatchRequestsAsync().waitForResponse(); } public java.util.concurrent.CompletableFuture<Void> ice_flushBatchRequestsAsync() { - return __ice_flushBatchRequestsAsync(); + return _iceI_ice_flushBatchRequestsAsync(); } - private com.zeroc.IceInternal.ProxyFlushBatch __ice_flushBatchRequestsAsync() + private com.zeroc.IceInternal.ProxyFlushBatch _iceI_ice_flushBatchRequestsAsync() { - com.zeroc.IceInternal.ProxyFlushBatch __f = new com.zeroc.IceInternal.ProxyFlushBatch(this); + com.zeroc.IceInternal.ProxyFlushBatch f = new com.zeroc.IceInternal.ProxyFlushBatch(this); try { - __f.invoke(); + f.invoke(); } catch(Exception ex) { - __f.abort(ex); + f.abort(ex); } - return __f; + return f; } @Override @@ -436,14 +436,14 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable } @Override - public void __write(OutputStream os) + public void _write(OutputStream os) { - _reference.getIdentity().ice_write(os); + _reference.getIdentity().write(os); _reference.streamWrite(os); } @Override - public void __copyFrom(ObjectPrx p) + public void _copyFrom(ObjectPrx p) { synchronized(p) { @@ -454,18 +454,18 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable } @Override - public com.zeroc.IceInternal.Reference __reference() + public com.zeroc.IceInternal.Reference _getReference() { return _reference; } @Override - public ObjectPrx __newInstance(com.zeroc.IceInternal.Reference ref) + public ObjectPrx _newInstance(com.zeroc.IceInternal.Reference ref) { try { _ObjectPrxI proxy = getClass().newInstance(); - proxy.__setup(ref); + proxy._setup(ref); return proxy; } catch(InstantiationException e) @@ -486,7 +486,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable } } - public StreamPair __getCachedMessageBuffers() + public StreamPair _getCachedMessageBuffers() { synchronized(this) { @@ -498,7 +498,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return null; } - public void __cacheMessageBuffers(InputStream is, OutputStream os) + public void _cacheMessageBuffers(InputStream is, OutputStream os) { synchronized(this) { @@ -510,10 +510,10 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable } } - public int __handleException(Exception ex, com.zeroc.IceInternal.RequestHandler handler, OperationMode mode, + public int _handleException(Exception ex, com.zeroc.IceInternal.RequestHandler handler, OperationMode mode, boolean sent, com.zeroc.IceInternal.Holder<Integer> interval, int cnt) { - __updateRequestHandler(handler, null); // Clear the request handler + _updateRequestHandler(handler, null); // Clear the request handler // // We only retry local exception, system exceptions aren't retried. @@ -556,7 +556,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable } } - public com.zeroc.IceInternal.RequestHandler __getRequestHandler() + public com.zeroc.IceInternal.RequestHandler _getRequestHandler() { if(_reference.getCacheConnection()) { @@ -571,7 +571,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return _reference.getRequestHandler(this); } - synchronized public com.zeroc.IceInternal.BatchRequestQueue __getBatchRequestQueue() + synchronized public com.zeroc.IceInternal.BatchRequestQueue _getBatchRequestQueue() { if(_batchRequestQueue == null) { @@ -580,7 +580,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return _batchRequestQueue; } - public com.zeroc.IceInternal.RequestHandler __setRequestHandler(com.zeroc.IceInternal.RequestHandler handler) + public com.zeroc.IceInternal.RequestHandler _setRequestHandler(com.zeroc.IceInternal.RequestHandler handler) { if(_reference.getCacheConnection()) { @@ -596,7 +596,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable return handler; } - public void __updateRequestHandler(com.zeroc.IceInternal.RequestHandler previous, + public void _updateRequestHandler(com.zeroc.IceInternal.RequestHandler previous, com.zeroc.IceInternal.RequestHandler handler) { if(_reference.getCacheConnection() && previous != null) @@ -621,7 +621,7 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable // // Only for use by ProxyFactory // - public void __setup(com.zeroc.IceInternal.Reference ref) + public void _setup(com.zeroc.IceInternal.Reference ref) { // // No need to synchronize, as this operation is only called diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/CommunicatorFlushBatch.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/CommunicatorFlushBatch.java index 13bc6a5b5a0..a7c4dc65b38 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/CommunicatorFlushBatch.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/CommunicatorFlushBatch.java @@ -28,9 +28,9 @@ public class CommunicatorFlushBatch extends InvocationFutureI<Void> } @Override - protected void __sent() + protected void markSent() { - super.__sent(); + super.markSent(); assert((_state & StateOK) != 0); complete(null); @@ -48,19 +48,19 @@ public class CommunicatorFlushBatch extends InvocationFutureI<Void> } @Override - protected void __sent() + protected void markSent() { assert(false); } @Override - protected boolean __needCallback() + protected boolean needCallback() { return false; } @Override - protected void __completed() + protected void markCompleted() { assert(false); } @@ -145,7 +145,7 @@ public class CommunicatorFlushBatch extends InvocationFutureI<Void> doCheck(true); } - public void __wait() + public void waitForResponse() { if(Thread.interrupted()) { diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectRequestHandler.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectRequestHandler.java index 12e6d3616a1..ffc5c51be46 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectRequestHandler.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectRequestHandler.java @@ -343,7 +343,7 @@ public class ConnectRequestHandler } for(com.zeroc.Ice._ObjectPrxI proxy : _proxies) { - proxy.__updateRequestHandler(previous, _requestHandler); + proxy._updateRequestHandler(previous, _requestHandler); } } diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectionFlushBatch.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectionFlushBatch.java index d576323caed..2d4a35a0f82 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectionFlushBatch.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ConnectionFlushBatch.java @@ -27,22 +27,22 @@ public class ConnectionFlushBatch extends OutgoingAsyncBaseI<Void> } @Override - protected void __sent() + protected void markSent() { - super.__sent(); + super.markSent(); assert((_state & StateOK) != 0); complete(null); } @Override - protected void __completed() + protected void markCompleted() { if(_exception != null) { completeExceptionally(_exception); } - super.__completed(); + super.markCompleted(); } public void invoke() diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/FixedReference.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/FixedReference.java index a861857bf4d..d7d7ce1ba09 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/FixedReference.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/FixedReference.java @@ -278,7 +278,7 @@ public class FixedReference extends Reference { handler = new QueueRequestHandler(getInstance(), handler); } - return proxy.__setRequestHandler(handler); + return proxy._setRequestHandler(handler); } @Override diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/Incoming.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/Incoming.java index 67941f3b1e5..687bc03d412 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/Incoming.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/Incoming.java @@ -114,7 +114,7 @@ final public class Incoming implements com.zeroc.Ice.Request // // Read the current. // - _current.id.ice_read(_is); + _current.id.read(_is); // // For compatibility with the old FacetPath. @@ -223,7 +223,7 @@ final public class Incoming implements com.zeroc.Ice.Request try { - CompletionStage<OutputStream> f = _servant.__dispatch(this, _current); + CompletionStage<OutputStream> f = _servant._iceDispatch(this, _current); if(f == null) { completed(null, false); @@ -617,7 +617,7 @@ final public class Incoming implements com.zeroc.Ice.Request { assert(false); } - ex.id.ice_write(_os); + ex.id.write(_os); // // For compatibility with the old FacetPath. diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java index 38821b2d98e..a99f3788e85 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java @@ -211,7 +211,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur return r; } - protected synchronized void __sent() + protected synchronized void markSent() { if(_sentFuture != null && !_sentFuture.isDone()) { @@ -230,7 +230,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur try { - __sent(); + markSent(); } catch(java.lang.RuntimeException ex) { @@ -265,12 +265,12 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur } } - protected boolean __needCallback() + protected boolean needCallback() { return true; } - protected void __completed() + protected void markCompleted() { if(_exception != null && _sentFuture != null) { @@ -289,7 +289,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur try { - __completed(); + markCompleted(); } catch(RuntimeException ex) { @@ -403,7 +403,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur _state |= StateOK; } _cancellationHandler = null; - if(!__needCallback()) + if(!needCallback()) { if(_observer != null) { @@ -412,7 +412,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur } } this.notifyAll(); - return __needCallback(); + return needCallback(); } } @@ -427,7 +427,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur { _observer.failed(ex.ice_id()); } - if(!__needCallback()) + if(!needCallback()) { if(_observer != null) { @@ -436,7 +436,7 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur } } this.notifyAll(); - return __needCallback(); + return needCallback(); } } diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorInfo.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorInfo.java index 8e5cc8974ce..bc7406c876d 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorInfo.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorInfo.java @@ -25,7 +25,7 @@ public final class LocatorInfo EndpointI[] endpoints = null; if(proxy != null) { - Reference r = ((com.zeroc.Ice._ObjectPrxI)proxy).__reference(); + Reference r = ((com.zeroc.Ice._ObjectPrxI)proxy)._getReference(); if(_ref.isWellKnown() && !Protocol.isSupported(_ref.getEncoding(), r.getEncoding())) { // @@ -644,7 +644,7 @@ public final class LocatorInfo finishRequest(Reference ref, java.util.List<Reference> wellKnownRefs, com.zeroc.Ice.ObjectPrx proxy, boolean notRegistered) { - if(proxy == null || ((com.zeroc.Ice._ObjectPrxI)proxy).__reference().isIndirect()) + if(proxy == null || ((com.zeroc.Ice._ObjectPrxI)proxy)._getReference().isIndirect()) { // // Remove the cached references of well-known objects for which we tried @@ -658,11 +658,11 @@ public final class LocatorInfo if(!ref.isWellKnown()) { - if(proxy != null && !((com.zeroc.Ice._ObjectPrxI)proxy).__reference().isIndirect()) + if(proxy != null && !((com.zeroc.Ice._ObjectPrxI)proxy)._getReference().isIndirect()) { // Cache the adapter endpoints. _table.addAdapterEndpoints(ref.getAdapterId(), - ((com.zeroc.Ice._ObjectPrxI)proxy).__reference().getEndpoints()); + ((com.zeroc.Ice._ObjectPrxI)proxy)._getReference().getEndpoints()); } else if(notRegistered) // If the adapter isn't registered anymore, remove it from the cache. { @@ -677,10 +677,10 @@ public final class LocatorInfo } else { - if(proxy != null && !((com.zeroc.Ice._ObjectPrxI)proxy).__reference().isWellKnown()) + if(proxy != null && !((com.zeroc.Ice._ObjectPrxI)proxy)._getReference().isWellKnown()) { // Cache the well-known object reference. - _table.addObjectReference(ref.getIdentity(), ((com.zeroc.Ice._ObjectPrxI)proxy).__reference()); + _table.addObjectReference(ref.getIdentity(), ((com.zeroc.Ice._ObjectPrxI)proxy)._getReference()); } else if(notRegistered) // If the well-known object isn't registered anymore, remove it from the cache. { diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorManager.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorManager.java index ae1aaca8019..a32a221e3f9 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorManager.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/LocatorManager.java @@ -58,7 +58,7 @@ public final class LocatorManager LocatorKey set(com.zeroc.Ice.LocatorPrx locator) { - Reference r = ((com.zeroc.Ice._ObjectPrxI)locator).__reference(); + Reference r = ((com.zeroc.Ice._ObjectPrxI)locator)._getReference(); _id = r.getIdentity(); _encoding = r.getEncoding(); return this; diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ObserverHelper.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ObserverHelper.java index 6075fcbd2b7..3be5ddc1f13 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ObserverHelper.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ObserverHelper.java @@ -40,7 +40,7 @@ public final class ObserverHelper get(com.zeroc.Ice.ObjectPrx proxy, String op, java.util.Map<String, String> context) { CommunicatorObserver obsv = - ((com.zeroc.Ice._ObjectPrxI)proxy).__reference().getInstance().initializationData().observer; + ((com.zeroc.Ice._ObjectPrxI)proxy)._getReference().getInstance().initializationData().observer; if(obsv != null) { InvocationObserver observer; diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/OutgoingAsync.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/OutgoingAsync.java index bff6a72055d..e3965ad6650 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/OutgoingAsync.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/OutgoingAsync.java @@ -34,11 +34,11 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> _mode = mode == null ? OperationMode.Normal : mode; _synchronous = synchronous; _userExceptions = userExceptions; - _encoding = Protocol.getCompatibleEncoding(_proxy.__reference().getEncoding()); + _encoding = Protocol.getCompatibleEncoding(_proxy._getReference().getEncoding()); if(_instance.cacheMessageBuffers() > 0) { - _ObjectPrxI.StreamPair p = _proxy.__getCachedMessageBuffers(); + _ObjectPrxI.StreamPair p = _proxy._getCachedMessageBuffers(); if(p != null) { _is = p.is; @@ -87,7 +87,7 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> // NOTE: we don't call sent/completed callbacks for batch AMI requests // _sentSynchronously = true; - _proxy.__getBatchRequestQueue().finishBatchRequest(_os, _proxy, _operation); + _proxy._getBatchRequestQueue().finishBatchRequest(_os, _proxy, _operation); finished(true); } else @@ -106,7 +106,7 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> } } - public T __wait() + public T waitForResponse() { if(isBatch()) { @@ -115,7 +115,7 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> try { - return __waitUserEx(); + return waitForResponseOrUserEx(); } catch(UserException ex) { @@ -123,7 +123,7 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> } } - public T __waitUserEx() + public T waitForResponseOrUserEx() throws UserException { if(Thread.interrupted()) @@ -161,9 +161,9 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> } @Override - protected void __sent() + protected void markSent() { - super.__sent(); + super.markSent(); if(!_proxy.ice_isTwoway()) { @@ -192,7 +192,7 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> public int invokeCollocated(CollocatedRequestHandler handler) { // The stream cannot be cached if the proxy is not a twoway or there is an invocation timeout set. - if(!_proxy.ice_isTwoway() || _proxy.__reference().getInvocationTimeout() > 0) + if(!_proxy.ice_isTwoway() || _proxy._getReference().getInvocationTimeout() > 0) { // Disable caching by marking the streams as cached! _state |= StateCachedBuffers; @@ -210,16 +210,16 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> // must notify the connection about that we give up ownership // of the batch stream. // - _proxy.__getBatchRequestQueue().abortBatchRequest(_os); + _proxy._getBatchRequestQueue().abortBatchRequest(_os); } super.abort(ex); } @Override - protected void __completed() + protected void markCompleted() { - super.__completed(); + super.markCompleted(); try { @@ -374,7 +374,7 @@ public class OutgoingAsync<T> extends ProxyOutgoingAsyncBaseI<T> } _os.reset(); - _proxy.__cacheMessageBuffers(_is, _os); + _proxy._cacheMessageBuffers(_is, _os); _is = null; _os = null; diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFactory.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFactory.java index 941dbab051a..0150fb73f78 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFactory.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFactory.java @@ -26,7 +26,7 @@ public final class ProxyFactory if(proxy != null) { com.zeroc.Ice._ObjectPrxI h = (com.zeroc.Ice._ObjectPrxI)proxy; - return h.__reference().toString(); + return h._getReference().toString(); } else { @@ -48,7 +48,7 @@ public final class ProxyFactory if(proxy != null) { com.zeroc.Ice._ObjectPrxI h = (com.zeroc.Ice._ObjectPrxI)proxy; - return h.__reference().toProperty(prefix); + return h._getReference().toProperty(prefix); } else { @@ -71,7 +71,7 @@ public final class ProxyFactory if(ref != null) { com.zeroc.Ice._ObjectPrxI proxy = new com.zeroc.Ice._ObjectPrxI(); - proxy.__setup(ref); + proxy._setup(ref); return proxy; } else diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFlushBatch.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFlushBatch.java index 5bdd570cd82..527a26658bd 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFlushBatch.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyFlushBatch.java @@ -15,7 +15,7 @@ public class ProxyFlushBatch extends ProxyOutgoingAsyncBaseI<Void> { super(prx, "ice_flushBatchRequests"); _observer = ObserverHelper.get(prx, "ice_flushBatchRequests"); - _batchRequestNum = prx.__getBatchRequestQueue().swap(_os); + _batchRequestNum = prx._getBatchRequestQueue().swap(_os); } @Override @@ -26,24 +26,24 @@ public class ProxyFlushBatch extends ProxyOutgoingAsyncBaseI<Void> } @Override - protected synchronized void __sent() + protected synchronized void markSent() { - super.__sent(); + super.markSent(); assert((_state & StateOK) != 0); complete(null); } @Override - protected boolean __needCallback() + protected boolean needCallback() { return true; } @Override - protected void __completed() + protected void markCompleted() { - super.__completed(); + super.markCompleted(); if(_exception != null) { completeExceptionally(_exception); @@ -74,11 +74,11 @@ public class ProxyFlushBatch extends ProxyOutgoingAsyncBaseI<Void> public void invoke() { - Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy.__reference().getProtocol())); + Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy._getReference().getProtocol())); invokeImpl(true); // userThread = true } - public void __wait() + public void waitForResponse() { if(Thread.interrupted()) { diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyGetConnection.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyGetConnection.java index 0363b63aba2..84effe3a4e7 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyGetConnection.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyGetConnection.java @@ -18,15 +18,15 @@ public class ProxyGetConnection extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Co } @Override - protected boolean __needCallback() + protected boolean needCallback() { return true; } @Override - protected void __completed() + protected void markCompleted() { - super.__completed(); + super.markCompleted(); if(_exception != null) { @@ -72,7 +72,7 @@ public class ProxyGetConnection extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Co invokeImpl(true); // userThread = true } - public com.zeroc.Ice.Connection __wait() + public com.zeroc.Ice.Connection waitForResponse() { if(Thread.interrupted()) { diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyIceInvoke.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyIceInvoke.java index e5fcdbe89b8..94f2dd82a64 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyIceInvoke.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyIceInvoke.java @@ -25,7 +25,7 @@ public class ProxyIceInvoke extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Object super((com.zeroc.Ice._ObjectPrxI)prx, operation); _mode = mode == null ? com.zeroc.Ice.OperationMode.Normal : mode; _synchronous = synchronous; - _encoding = Protocol.getCompatibleEncoding(_proxy.__reference().getEncoding()); + _encoding = Protocol.getCompatibleEncoding(_proxy._getReference().getEncoding()); _is = null; } @@ -42,7 +42,7 @@ public class ProxyIceInvoke extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Object // NOTE: we don't call sent/completed callbacks for batch AMI requests // _sentSynchronously = true; - _proxy.__getBatchRequestQueue().finishBatchRequest(_os, _proxy, _operation); + _proxy._getBatchRequestQueue().finishBatchRequest(_os, _proxy, _operation); finished(true); } else @@ -61,7 +61,7 @@ public class ProxyIceInvoke extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Object } } - public com.zeroc.Ice.Object.Ice_invokeResult __wait() + public com.zeroc.Ice.Object.Ice_invokeResult waitForResponse() { if(isBatch()) { @@ -102,9 +102,9 @@ public class ProxyIceInvoke extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Object } @Override - protected void __sent() + protected void markSent() { - super.__sent(); + super.markSent(); if(!_proxy.ice_isTwoway()) { @@ -133,7 +133,7 @@ public class ProxyIceInvoke extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Object public int invokeCollocated(CollocatedRequestHandler handler) { // The stream cannot be cached if the proxy is not a twoway or there is an invocation timeout set. - if(!_proxy.ice_isTwoway() || _proxy.__reference().getInvocationTimeout() > 0) + if(!_proxy.ice_isTwoway() || _proxy._getReference().getInvocationTimeout() > 0) { // Disable caching by marking the streams as cached! _state |= StateCachedBuffers; @@ -151,16 +151,16 @@ public class ProxyIceInvoke extends ProxyOutgoingAsyncBaseI<com.zeroc.Ice.Object // must notify the connection about that we give up ownership // of the batch stream. // - _proxy.__getBatchRequestQueue().abortBatchRequest(_os); + _proxy._getBatchRequestQueue().abortBatchRequest(_os); } super.abort(ex); } @Override - protected void __completed() + protected void markCompleted() { - super.__completed(); + super.markCompleted(); if(_exception != null) { diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyOutgoingAsyncBaseI.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyOutgoingAsyncBaseI.java index cb29f052104..7cb2a1ee367 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyOutgoingAsyncBaseI.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ProxyOutgoingAsyncBaseI.java @@ -220,7 +220,7 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i // require could end up waiting for the flush of the // connection to be done. // - _proxy.__updateRequestHandler(_handler, null); // Clear request handler and always retry. + _proxy._updateRequestHandler(_handler, null); // Clear request handler and always retry. _instance.retryQueue().add(this, 0); } catch(com.zeroc.Ice.Exception exc) @@ -240,7 +240,7 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i public void cancelable(final CancellationHandler handler) { - if(_proxy.__reference().getInvocationTimeout() == -2 && _cachedConnection != null) + if(_proxy._getReference().getInvocationTimeout() == -2 && _cachedConnection != null) { final int timeout = _cachedConnection.timeout(); if(timeout > 0) @@ -280,26 +280,26 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i protected ProxyOutgoingAsyncBaseI(com.zeroc.Ice._ObjectPrxI prx, String op) { - super(prx.ice_getCommunicator(), prx.__reference().getInstance(), op); + super(prx.ice_getCommunicator(), prx._getReference().getInstance(), op); _proxy = prx; _mode = com.zeroc.Ice.OperationMode.Normal; _cnt = 0; _sent = false; - _proxyMode = _proxy.__reference().getMode(); + _proxyMode = _proxy._getReference().getMode(); } protected ProxyOutgoingAsyncBaseI(com.zeroc.Ice._ObjectPrxI prx, String op, com.zeroc.Ice.OutputStream os) { - super(prx.ice_getCommunicator(), prx.__reference().getInstance(), op, os); + super(prx.ice_getCommunicator(), prx._getReference().getInstance(), op, os); _proxy = prx; _mode = com.zeroc.Ice.OperationMode.Normal; _cnt = 0; _sent = false; - _proxyMode = _proxy.__reference().getMode(); + _proxyMode = _proxy._getReference().getMode(); } @Override - protected boolean __needCallback() + protected boolean needCallback() { return !isBatch(); } @@ -310,7 +310,7 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i { if(userThread) { - int invocationTimeout = _proxy.__reference().getInvocationTimeout(); + int invocationTimeout = _proxy._getReference().getInvocationTimeout(); if(invocationTimeout > 0) { _timerFuture = _instance.timer().schedule( @@ -338,7 +338,7 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i { _sent = false; _handler = null; - _handler = _proxy.__getRequestHandler(); + _handler = _proxy._getRequestHandler(); int status = _handler.sendAsyncRequest(this); if((status & AsyncStatus.Sent) > 0) { @@ -362,7 +362,7 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i } catch(RetryException ex) { - _proxy.__updateRequestHandler(_handler, null); // Clear request handler and always retry. + _proxy._updateRequestHandler(_handler, null); // Clear request handler and always retry. } catch(com.zeroc.Ice.Exception ex) { @@ -442,13 +442,13 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i protected int handleException(com.zeroc.Ice.Exception exc) { Holder<Integer> interval = new Holder<>(); - _cnt = _proxy.__handleException(exc, _handler, _mode, _sent, interval, _cnt); + _cnt = _proxy._handleException(exc, _handler, _mode, _sent, interval, _cnt); return interval.value; } protected void prepare(java.util.Map<String, String> ctx) { - Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy.__reference().getProtocol())); + Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(_proxy._getReference().getProtocol())); _observer = ObserverHelper.get(_proxy, _operation, ctx == null ? _emptyContext : ctx); @@ -465,14 +465,14 @@ public abstract class ProxyOutgoingAsyncBaseI<T> extends OutgoingAsyncBaseI<T> i case Reference.ModeBatchOneway: case Reference.ModeBatchDatagram: { - _proxy.__getBatchRequestQueue().prepareBatchRequest(_os); + _proxy._getBatchRequestQueue().prepareBatchRequest(_os); break; } } - Reference ref = _proxy.__reference(); + Reference ref = _proxy._getReference(); - ref.getIdentity().ice_write(_os); + ref.getIdentity().write(_os); // // For compatibility with the old FacetPath. diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/Reference.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/Reference.java index 2b2d2fc12e0..0b246868519 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/Reference.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/Reference.java @@ -283,8 +283,8 @@ public abstract class Reference implements Cloneable if(!s.getEncoding().equals(com.zeroc.Ice.Util.Encoding_1_0)) { - _protocol.ice_write(s); - _encoding.ice_write(s); + _protocol.write(s); + _encoding.write(s); } // Derived class writes the remainder of the reference. diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ReferenceFactory.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ReferenceFactory.java index b9313f1d136..47d6622bafa 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ReferenceFactory.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ReferenceFactory.java @@ -744,7 +744,7 @@ public final class ReferenceFactory LocatorInfo locatorInfo = null; if(_defaultLocator != null) { - if(!((com.zeroc.Ice._ObjectPrxI)_defaultLocator).__reference().getEncoding().equals(encoding)) + if(!((com.zeroc.Ice._ObjectPrxI)_defaultLocator)._getReference().getEncoding().equals(encoding)) { locatorInfo = _instance.locatorManager().get(_defaultLocator.ice_encodingVersion(encoding)); } @@ -784,7 +784,7 @@ public final class ReferenceFactory com.zeroc.Ice.LocatorPrx.uncheckedCast(_communicator.propertyToProxy(property)); if(locator != null) { - if(!((com.zeroc.Ice._ObjectPrxI)locator).__reference().getEncoding().equals(encoding)) + if(!((com.zeroc.Ice._ObjectPrxI)locator)._getReference().getEncoding().equals(encoding)) { locatorInfo = _instance.locatorManager().get(locator.ice_encodingVersion(encoding)); } diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/RequestHandlerFactory.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/RequestHandlerFactory.java index 19b2a85ad9b..491449fe503 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/RequestHandlerFactory.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/RequestHandlerFactory.java @@ -28,7 +28,7 @@ public final class RequestHandlerFactory com.zeroc.Ice.ObjectAdapter adapter = _instance.objectAdapterFactory().findObjectAdapter(proxy); if(adapter != null) { - return proxy.__setRequestHandler(new CollocatedRequestHandler(ref, adapter)); + return proxy._setRequestHandler(new CollocatedRequestHandler(ref, adapter)); } } @@ -73,7 +73,7 @@ public final class RequestHandlerFactory ref.getConnection(handler); } } - return proxy.__setRequestHandler(handler.connect(proxy)); + return proxy._setRequestHandler(handler.connect(proxy)); } void diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/RoutableReference.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/RoutableReference.java index 4600da1e9d3..846708989bf 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/RoutableReference.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/RoutableReference.java @@ -395,7 +395,7 @@ public class RoutableReference extends Reference if(_routerInfo != null) { com.zeroc.Ice._ObjectPrxI h = (com.zeroc.Ice._ObjectPrxI)_routerInfo.getRouter(); - java.util.Map<String, String> routerProperties = h.__reference().toProperty(prefix + ".Router"); + java.util.Map<String, String> routerProperties = h._getReference().toProperty(prefix + ".Router"); for(java.util.Map.Entry<String, String> p : routerProperties.entrySet()) { properties.put(p.getKey(), p.getValue()); @@ -405,7 +405,7 @@ public class RoutableReference extends Reference if(_locatorInfo != null) { com.zeroc.Ice._ObjectPrxI h = (com.zeroc.Ice._ObjectPrxI)_locatorInfo.getLocator(); - java.util.Map<String, String> locatorProperties = h.__reference().toProperty(prefix + ".Locator"); + java.util.Map<String, String> locatorProperties = h._getReference().toProperty(prefix + ".Locator"); for(java.util.Map.Entry<String, String> p : locatorProperties.entrySet()) { properties.put(p.getKey(), p.getValue()); diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/RouterInfo.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/RouterInfo.java index e103ead153a..109965fe194 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/RouterInfo.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/RouterInfo.java @@ -201,7 +201,7 @@ public final class RouterInfo // // If getClientProxy() return nil, use router endpoints. // - _clientEndpoints = ((com.zeroc.Ice._ObjectPrxI)_router).__reference().getEndpoints(); + _clientEndpoints = ((com.zeroc.Ice._ObjectPrxI)_router)._getReference().getEndpoints(); } else { @@ -217,7 +217,7 @@ public final class RouterInfo clientProxy = clientProxy.ice_timeout(_router.ice_getConnection().timeout()); } - _clientEndpoints = ((com.zeroc.Ice._ObjectPrxI)clientProxy).__reference().getEndpoints(); + _clientEndpoints = ((com.zeroc.Ice._ObjectPrxI)clientProxy)._getReference().getEndpoints(); } } return _clientEndpoints; @@ -232,7 +232,7 @@ public final class RouterInfo } serverProxy = serverProxy.ice_router(null); // The server proxy cannot be routed. - _serverEndpoints = ((com.zeroc.Ice._ObjectPrxI)serverProxy).__reference().getEndpoints(); + _serverEndpoints = ((com.zeroc.Ice._ObjectPrxI)serverProxy)._getReference().getEndpoints(); return _serverEndpoints; } diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/UdpEndpointI.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/UdpEndpointI.java index d11b031271f..67057b67191 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/UdpEndpointI.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/UdpEndpointI.java @@ -258,8 +258,8 @@ final class UdpEndpointI extends IPEndpointI super.streamWriteImpl(s); if(s.getEncoding().equals(com.zeroc.Ice.Util.Encoding_1_0)) { - com.zeroc.Ice.Util.Protocol_1_0.ice_write(s); - com.zeroc.Ice.Util.Encoding_1_0.ice_write(s); + com.zeroc.Ice.Util.Protocol_1_0.write(s); + com.zeroc.Ice.Util.Encoding_1_0.write(s); } // Not transmitted. //s.writeBool(_connect); diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ValueWriter.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ValueWriter.java index 45f4c8e8a94..2ac38d8bb26 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/ValueWriter.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/ValueWriter.java @@ -84,7 +84,7 @@ public final class ValueWriter { writeName(name, out); com.zeroc.Ice._ObjectPrxI proxy = (com.zeroc.Ice._ObjectPrxI)value; - out.print(proxy.__reference().toString()); + out.print(proxy._getReference().toString()); } else if(value instanceof com.zeroc.Ice.Value) { diff --git a/java/test/src/main/java/test/Ice/operations/Twoways.java b/java/test/src/main/java/test/Ice/operations/Twoways.java index c1221544e81..2847261d507 100644 --- a/java/test/src/main/java/test/Ice/operations/Twoways.java +++ b/java/test/src/main/java/test/Ice/operations/Twoways.java @@ -139,8 +139,8 @@ class Twoways test(p.ice_id().equals(MyDerivedClass.ice_staticId())); test(MyDerivedClassPrx.ice_staticId().equals(MyDerivedClass.ice_staticId())); - test(ObjectPrx.ice_staticId().equals(com.zeroc.Ice.Object.ice_staticId)); - test(LocatorPrx.ice_staticId().equals(Locator.ice_staticId)); + test(ObjectPrx.ice_staticId().equals(com.zeroc.Ice.Object.ice_staticId())); + test(LocatorPrx.ice_staticId().equals(Locator.ice_staticId())); { String[] ids = p.ice_ids(); diff --git a/java/test/src/main/java/test/Ice/packagemd/InitialI.java b/java/test/src/main/java/test/Ice/packagemd/InitialI.java index 76453dfa6f3..1851e2724f2 100644 --- a/java/test/src/main/java/test/Ice/packagemd/InitialI.java +++ b/java/test/src/main/java/test/Ice/packagemd/InitialI.java @@ -18,109 +18,109 @@ import test.Ice.packagemd.Test1._notify; public final class InitialI implements Initial { - public com.zeroc.Ice.Value getTest1C2AsObject(com.zeroc.Ice.Current __current) + public com.zeroc.Ice.Value getTest1C2AsObject(com.zeroc.Ice.Current current) { return new C2(); } @Override - public C1 getTest1C2AsC1(com.zeroc.Ice.Current __current) + public C1 getTest1C2AsC1(com.zeroc.Ice.Current current) { return new C2(); } @Override - public C2 getTest1C2AsC2(com.zeroc.Ice.Current __current) + public C2 getTest1C2AsC2(com.zeroc.Ice.Current current) { return new C2(); } @Override - public void throwTest1E2AsE1(com.zeroc.Ice.Current __current) + public void throwTest1E2AsE1(com.zeroc.Ice.Current current) throws E1 { throw new E2(); } @Override - public void throwTest1E2AsE2(com.zeroc.Ice.Current __current) + public void throwTest1E2AsE2(com.zeroc.Ice.Current current) throws E2 { throw new E2(); } @Override - public void throwTest1Notify(com.zeroc.Ice.Current __current) + public void throwTest1Notify(com.zeroc.Ice.Current current) throws _notify { throw new _notify(); } - public com.zeroc.Ice.Value getTest2C2AsObject(com.zeroc.Ice.Current __current) + public com.zeroc.Ice.Value getTest2C2AsObject(com.zeroc.Ice.Current current) { return new test.Ice.packagemd.testpkg.Test2.C2(); } @Override - public test.Ice.packagemd.testpkg.Test2.C1 getTest2C2AsC1(com.zeroc.Ice.Current __current) + public test.Ice.packagemd.testpkg.Test2.C1 getTest2C2AsC1(com.zeroc.Ice.Current current) { return new test.Ice.packagemd.testpkg.Test2.C2(); } @Override - public test.Ice.packagemd.testpkg.Test2.C2 getTest2C2AsC2(com.zeroc.Ice.Current __current) + public test.Ice.packagemd.testpkg.Test2.C2 getTest2C2AsC2(com.zeroc.Ice.Current current) { return new test.Ice.packagemd.testpkg.Test2.C2(); } @Override - public void throwTest2E2AsE1(com.zeroc.Ice.Current __current) + public void throwTest2E2AsE1(com.zeroc.Ice.Current current) throws test.Ice.packagemd.testpkg.Test2.E1 { throw new test.Ice.packagemd.testpkg.Test2.E2(); } @Override - public void throwTest2E2AsE2(com.zeroc.Ice.Current __current) + public void throwTest2E2AsE2(com.zeroc.Ice.Current current) throws test.Ice.packagemd.testpkg.Test2.E2 { throw new test.Ice.packagemd.testpkg.Test2.E2(); } - public com.zeroc.Ice.Value getTest3C2AsObject(com.zeroc.Ice.Current __current) + public com.zeroc.Ice.Value getTest3C2AsObject(com.zeroc.Ice.Current current) { return new test.Ice.packagemd.testpkg.Test3.C2(); } @Override - public test.Ice.packagemd.testpkg.Test3.C1 getTest3C2AsC1(com.zeroc.Ice.Current __current) + public test.Ice.packagemd.testpkg.Test3.C1 getTest3C2AsC1(com.zeroc.Ice.Current current) { return new test.Ice.packagemd.testpkg.Test3.C2(); } @Override - public test.Ice.packagemd.testpkg.Test3.C2 getTest3C2AsC2(com.zeroc.Ice.Current __current) + public test.Ice.packagemd.testpkg.Test3.C2 getTest3C2AsC2(com.zeroc.Ice.Current current) { return new test.Ice.packagemd.testpkg.Test3.C2(); } @Override - public void throwTest3E2AsE1(com.zeroc.Ice.Current __current) + public void throwTest3E2AsE1(com.zeroc.Ice.Current current) throws test.Ice.packagemd.testpkg.Test3.E1 { throw new test.Ice.packagemd.testpkg.Test3.E2(); } @Override - public void throwTest3E2AsE2(com.zeroc.Ice.Current __current) + public void throwTest3E2AsE2(com.zeroc.Ice.Current current) throws test.Ice.packagemd.testpkg.Test3.E2 { throw new test.Ice.packagemd.testpkg.Test3.E2(); } @Override - public void shutdown(com.zeroc.Ice.Current __current) + public void shutdown(com.zeroc.Ice.Current current) { - __current.adapter.getCommunicator().shutdown(); + current.adapter.getCommunicator().shutdown(); } } diff --git a/java/test/src/main/java/test/Ice/stream/Client.java b/java/test/src/main/java/test/Ice/stream/Client.java index 86ff5d34565..054b39302d4 100644 --- a/java/test/src/main/java/test/Ice/stream/Client.java +++ b/java/test/src/main/java/test/Ice/stream/Client.java @@ -43,7 +43,7 @@ public class Client extends test.Util.Application @Override public void write(OutputStream out) { - obj.__write(out); + obj._iceWrite(out); called = true; } @@ -57,7 +57,7 @@ public class Client extends test.Util.Application public void read(InputStream in) { obj = new MyClass(); - obj.__read(in); + obj._iceRead(in); called = true; } |