summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2java')
-rw-r--r--cpp/src/slice2java/Gen.cpp270
-rw-r--r--cpp/src/slice2java/GenCompat.cpp304
2 files changed, 287 insertions, 287 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index fb79c634628..2db53d50907 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -162,11 +162,11 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package,
string abs;
if(c->isInterface())
{
- abs = getAbsolute(c, package);
+ abs = getUnqualified(c, package);
}
else
{
- abs = getAbsolute(c, package, "", "Disp");
+ abs = getUnqualified(c, package, "", "Disp");
}
string name = op->name();
name[0] = toupper(static_cast<unsigned char>(name[0]));
@@ -176,7 +176,7 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package,
{
const ContainedPtr c = ContainedPtr::dynamicCast(op->container());
assert(c);
- const string abs = getAbsolute(c, package);
+ const string abs = getUnqualified(c, package);
string name = op->name();
name[0] = toupper(static_cast<unsigned char>(name[0]));
return abs + "." + name + "Result";
@@ -397,7 +397,7 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s
ParamDeclList required, optional;
op->outParameters(required, optional);
- out << sp << nl << "public void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
int iter = 0;
@@ -441,7 +441,7 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s
out << eb;
- out << sp << nl << "public void read(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public void read(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr)";
out << sb;
iter = 0;
@@ -505,12 +505,12 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op
opName[0] = toupper(static_cast<unsigned char>(opName[0]));
out << sp << nl << "public static class " << opName << "MarshaledResult implements "
- << getAbsolute("com.zeroc.Ice.MarshaledResult", package) << sb;
+ << getUnqualified("com.zeroc.Ice.MarshaledResult", package) << sb;
const ParamDeclList outParams = op->outParameters();
const string retval = getEscapedParamName(op, "returnValue");
const string currentParamName = getEscapedParamName(op, "current");
- const string currentParam = getAbsolute("com.zeroc.Ice.Current", package) + " " + currentParamName;
+ const string currentParam = getUnqualified("com.zeroc.Ice.Current", package) + " " + currentParamName;
out << sp;
@@ -559,7 +559,7 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op
}
out << currentParam << epar;
out << sb;
- out << nl << "_ostr = " << getAbsolute("com.zeroc.IceInternal.Incoming", package) << ".createResponseOutputStream("
+ out << nl << "_ostr = " << getUnqualified("com.zeroc.IceInternal.Incoming", package) << ".createResponseOutputStream("
<< currentParamName << ");";
out << nl << "_ostr.startEncapsulation(" << currentParamName << ".encoding, " << opFormatTypeToString(op) << ");";
@@ -690,13 +690,13 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op
out << sp;
out << nl << "@Override"
- << nl << "public " << getAbsolute("com.zeroc.Ice.OutputStream", package) << " getOutputStream()"
+ << nl << "public " << getUnqualified("com.zeroc.Ice.OutputStream", package) << " getOutputStream()"
<< sb
<< nl << "return _ostr;"
<< eb;
out << sp;
- out << nl << "private " << getAbsolute("com.zeroc.Ice.OutputStream", package) << " _ostr;";
+ out << nl << "private " << getUnqualified("com.zeroc.Ice.OutputStream", package) << " _ostr;";
out << eb;
}
@@ -711,11 +711,11 @@ Slice::JavaVisitor::allocatePatcher(Output& out, const TypePtr& type, const stri
string clsName;
if(b || cl->isInterface())
{
- clsName = getAbsolute("com.zeroc.Ice.Value", package);
+ clsName = getUnqualified("com.zeroc.Ice.Value", package);
}
else
{
- clsName = getAbsolute(cl, package);
+ clsName = getUnqualified(cl, package);
}
if(optionalMapping)
{
@@ -736,11 +736,11 @@ Slice::JavaVisitor::getPatcher(const TypePtr& type, const string& package, const
string clsName;
if(b || cl->isInterface())
{
- clsName = getAbsolute("com.zeroc.Ice.Value", package);
+ clsName = getUnqualified("com.zeroc.Ice.Value", package);
}
else
{
- clsName = getAbsolute(cl, package);
+ clsName = getUnqualified(cl, package);
}
ostr << "v -> " << dest << " = v, " << clsName << ".class";
}
@@ -1000,7 +1000,7 @@ Slice::JavaVisitor::writeThrowsClause(const string& package, const ExceptionList
if(op && (op->hasMetaData("java:UserException") || op->hasMetaData("UserException")))
{
out.inc();
- out << nl << "throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("com.zeroc.Ice.UserException", package);
out.dec();
}
else if(throws.size() > 0)
@@ -1015,7 +1015,7 @@ Slice::JavaVisitor::writeThrowsClause(const string& package, const ExceptionList
{
out << "," << nl;
}
- out << getAbsolute(*r, package);
+ out << getUnqualified(*r, package);
count++;
}
out.restoreIndent();
@@ -1111,7 +1111,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
vector<string> params = getParams(op, package);
- const string currentParam = getAbsolute("com.zeroc.Ice.Current", package) + " " +
+ const string currentParam = getUnqualified("com.zeroc.Ice.Current", package) + " " +
getEscapedParamName(op, "current");
const bool amd = p->hasMetaData("amd") || op->hasMetaData("amd");
@@ -1170,13 +1170,13 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
out << eb << ';';
- out << sp << nl << "@Override" << nl << "default String[] ice_ids(" << getAbsolute("com.zeroc.Ice.Current", package)
+ out << sp << nl << "@Override" << nl << "default String[] ice_ids(" << getUnqualified("com.zeroc.Ice.Current", package)
<< " current)";
out << sb;
out << nl << "return _iceIds;";
out << eb;
- out << sp << nl << "@Override" << nl << "default String ice_id(" << getAbsolute("com.zeroc.Ice.Current", package)
+ out << sp << nl << "@Override" << nl << "default String ice_id(" << getUnqualified("com.zeroc.Ice.Current", package)
<< " current)";
out << sb;
out << nl << "return ice_staticId();";
@@ -1214,7 +1214,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << nl << "@Deprecated";
}
out << nl << "static java.util.concurrent.CompletionStage<"
- << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< "> _iceD_" << opName << '(';
if(p->isInterface())
{
@@ -1224,12 +1224,12 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
{
out << p->name() << "Disp";
}
- out << " obj, final " << getAbsolute("com.zeroc.IceInternal.Incoming", package) << " inS, "
- << getAbsolute("com.zeroc.Ice.Current", package) << " current)";
+ out << " obj, final " << getUnqualified("com.zeroc.IceInternal.Incoming", package) << " inS, "
+ << getUnqualified("com.zeroc.Ice.Current", package) << " current)";
if(!op->throws().empty() || op->hasMetaData("java:UserException") || op->hasMetaData("UserException"))
{
out.inc();
- out << nl << "throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("com.zeroc.Ice.UserException", package);
out.dec();
}
out << sb;
@@ -1241,7 +1241,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
const ParamDeclList inParams = op->inParameters();
const ParamDeclList outParams = op->outParameters();
- out << nl << getAbsolute("com.zeroc.Ice.Object", package) << "._iceCheckMode(" << sliceModeToIceMode(op->mode())
+ out << nl << getUnqualified("com.zeroc.Ice.Object", package) << "._iceCheckMode(" << sliceModeToIceMode(op->mode())
<< ", current.mode);";
if(!inParams.empty())
@@ -1251,7 +1251,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
//
// Declare 'in' parameters.
//
- out << nl << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr = inS.startReadParams();";
+ out << nl << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr = inS.startReadParams();";
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
const TypePtr paramType = (*pli)->type();
@@ -1356,7 +1356,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
else if(ret || !outParams.empty())
{
- out << nl << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
+ out << nl << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
writeMarshalServantResults(out, package, op, "ret");
out << nl << "inS.endWriteParams(ostr);";
out << nl << "return inS.setResult(ostr);";
@@ -1411,18 +1411,18 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
}
out << nl << "@Override" << nl
- << "default java.util.concurrent.CompletionStage<" << getAbsolute("com.zeroc.Ice.OutputStream", package)
- << "> _iceDispatch(" << getAbsolute("com.zeroc.IceInternal.Incoming", package) << " in, "
- << getAbsolute("com.zeroc.Ice.Current", package) << " current)";
+ << "default java.util.concurrent.CompletionStage<" << getUnqualified("com.zeroc.Ice.OutputStream", package)
+ << "> _iceDispatch(" << getUnqualified("com.zeroc.IceInternal.Incoming", package) << " in, "
+ << getUnqualified("com.zeroc.Ice.Current", package) << " current)";
out.inc();
- out << nl << "throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("com.zeroc.Ice.UserException", package);
out.dec();
out << sb;
out << nl << "int pos = java.util.Arrays.binarySearch(_iceOps, current.operation);";
out << nl << "if(pos < 0)";
out << sb;
out << nl << "throw new "
- << getAbsolute("com.zeroc.Ice.OperationNotExistException", package)
+ << getUnqualified("com.zeroc.Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
out << sp << nl << "switch(pos)";
@@ -1436,22 +1436,22 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << sb;
if(opName == "ice_id")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_id(this, in, current);";
}
else if(opName == "ice_ids")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_ids(this, in, current);";
}
else if(opName == "ice_isA")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_isA(this, in, current);";
}
else if(opName == "ice_ping")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_ping(this, in, current);";
}
else
@@ -1475,11 +1475,11 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
string base;
if(cl->isInterface())
{
- base = getAbsolute(cl, package);
+ base = getUnqualified(cl, package);
}
else
{
- base = getAbsolute(cl, package, "", "Disp");
+ base = getUnqualified(cl, package, "", "Disp");
}
out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);";
}
@@ -1491,7 +1491,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
out << eb;
out << sp << nl << "assert(false);";
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.OperationNotExistException", package)
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
}
@@ -1520,14 +1520,14 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
{
out << sp;
out << nl << "@Override";
- out << nl << "public " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
+ out << nl << "public " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
out << sb;
out << nl << "return _iceSlicedData;";
out << eb;
out << sp;
out << nl << "@Override";
- out << nl << "public void _iceWrite(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << nl << "public void _iceWrite(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startValue(_iceSlicedData);";
out << nl << "_iceWriteImpl(ostr);";
@@ -1536,7 +1536,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "public void _iceRead(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr)";
+ out << nl << "public void _iceRead(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startValue();";
out << nl << "_iceReadImpl(istr);";
@@ -1546,7 +1546,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _iceWriteImpl(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr_)";
+ out << nl << "protected void _iceWriteImpl(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
iter = 0;
@@ -1573,7 +1573,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _iceReadImpl(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr_)";
+ out << nl << "protected void _iceReadImpl(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
@@ -1599,7 +1599,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " _iceSlicedData;";
+ out << sp << nl << "protected " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " _iceSlicedData;";
}
}
@@ -1610,7 +1610,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
ConstPtr constant = ConstPtr::dynamicCast(valueType);
if(constant)
{
- out << getAbsolute(constant, package) << ".value";
+ out << getUnqualified(constant, package) << ".value";
}
else
{
@@ -1663,7 +1663,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
{
EnumeratorPtr lte = EnumeratorPtr::dynamicCast(valueType);
assert(lte);
- out << getAbsolute(lte, package);
+ out << getUnqualified(lte, package);
}
else
{
@@ -1707,7 +1707,7 @@ Slice::JavaVisitor::writeDataMemberInitializers(Output& out, const DataMemberLis
if(en)
{
string firstEnum = fixKwd(en->enumerators().front()->name());
- out << nl << "this." << fixKwd((*p)->name()) << " = " << getAbsolute(en, package) << '.' << firstEnum << ';';
+ out << nl << "this." << fixKwd((*p)->name()) << " = " << getUnqualified(en, package) << '.' << firstEnum << ';';
}
StructPtr st = StructPtr::dynamicCast(t);
@@ -2090,7 +2090,7 @@ Slice::JavaVisitor::writeServantDocComment(Output& out, const OperationPtr& p, c
if(p->hasMetaData("java:UserException") || p->hasMetaData("UserException"))
{
- out << nl << " * @throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << " * @throws " << getUnqualified("com.zeroc.Ice.UserException", package);
}
else
{
@@ -2173,7 +2173,7 @@ Slice::JavaVisitor::writeSeeAlso(Output& out, const UnitPtr& unit, const string&
{
ContainedPtr cont = ContainedPtr::dynamicCast(l.front());
assert(cont);
- out << getAbsolute(cont) << rest;
+ out << getUnqualified(cont) << rest;
}
}
@@ -2316,7 +2316,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -2366,11 +2366,11 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out.useCurrentPosAsIndent();
if(!p->isLocal() && bases.empty())
{
- out << getAbsolute("com.zeroc.Ice.Object", package);
+ out << getUnqualified("com.zeroc.Ice.Object", package);
}
else if(q != bases.end())
{
- out << getAbsolute(*q++, package);
+ out << getUnqualified(*q++, package);
}
else if(r != implements.end())
{
@@ -2379,7 +2379,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
for(;q != bases.end(); ++q)
{
- out << ',' << nl << getAbsolute(*q, package);
+ out << ',' << nl << getUnqualified(*q, package);
}
for(; r != implements.end(); ++r)
{
@@ -2399,12 +2399,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(baseClass)
{
- out << " extends " << getAbsolute(baseClass, package);
+ out << " extends " << getUnqualified(baseClass, package);
bases.pop_front();
}
else if(!p->isLocal())
{
- out << " extends " << getAbsolute("com.zeroc.Ice.Value", package);
+ out << " extends " << getUnqualified("com.zeroc.Ice.Value", package);
}
if(p->isLocal())
@@ -2416,7 +2416,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q)
{
- implements.push_back(getAbsolute(*q, package));
+ implements.push_back(getUnqualified(*q, package));
}
}
@@ -2788,7 +2788,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
string scoped = p->scoped();
ExceptionPtr base = p->base();
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -2811,16 +2811,16 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
if(p->isLocal())
{
- out << getAbsolute("com.zeroc.Ice.LocalException", package);
+ out << getUnqualified("com.zeroc.Ice.LocalException", package);
}
else
{
- out << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << getUnqualified("com.zeroc.Ice.UserException", package);
}
}
else
{
- out << getAbsolute(base, package);
+ out << getUnqualified(base, package);
}
out << sb;
@@ -3087,14 +3087,14 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
out << sp;
out << nl << "@Override";
- out << nl << "public " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
+ out << nl << "public " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
out << sb;
out << nl << "return _slicedData;";
out << eb;
out << sp;
out << nl << "@Override";
- out << nl << "public void _write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << nl << "public void _write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startException(_slicedData);";
out << nl << "_writeImpl(ostr);";
@@ -3103,7 +3103,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "public void _read(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr)";
+ out << nl << "public void _read(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startException();";
out << nl << "_readImpl(istr);";
@@ -3113,7 +3113,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _writeImpl(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr_)";
+ out << nl << "protected void _writeImpl(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
iter = 0;
@@ -3140,7 +3140,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _readImpl(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr_)";
+ out << nl << "protected void _readImpl(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
iter = 0;
@@ -3177,7 +3177,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " _slicedData;";
+ out << sp << nl << "protected " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " _slicedData;";
}
}
@@ -3229,7 +3229,7 @@ bool
Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
{
string name = fixKwd(p->name());
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
open(absolute, p->file());
@@ -3454,7 +3454,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void ice_writeMembers(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << sp << nl << "public void ice_writeMembers(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr)";
out << sb;
iter = 0;
@@ -3466,7 +3466,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
DataMemberList classMembers = p->classDataMembers();
- out << sp << nl << "public void ice_readMembers(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "public void ice_readMembers(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
iter = 0;
@@ -3476,7 +3476,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
}
out << eb;
- out << sp << nl << "static public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << sp << nl << "static public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, " << name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -3489,7 +3489,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << eb;
- out << sp << nl << "static public " << name << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "static public " << name << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << name << " v = new " << name << "();";
@@ -3499,7 +3499,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
string optName = "java.util.Optional<" + name + ">";
out << sp;
- out << nl << "static public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "static public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << optName << " v)";
out << sb;
out << nl << "if(v != null && v.isPresent())";
@@ -3509,7 +3509,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << sp;
- out << nl << "static public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "static public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << name << " v)";
out << sb;
out << nl << "if(ostr.writeOptional(tag, " << getOptionalFormat(p) << "))";
@@ -3529,7 +3529,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << sp;
- out << nl << "static public " << optName << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "static public " << optName << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
out << nl << "if(istr.readOptional(tag, " << getOptionalFormat(p) << "))";
@@ -3945,7 +3945,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
EnumeratorList enumerators = p->enumerators();
open(absolute, p->file());
@@ -4013,12 +4013,12 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.writeEnum(_value, " << p->maxValue() << ");";
out << eb;
- out << sp << nl << "public static void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << sp << nl << "public static void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, " << name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -4032,7 +4032,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << eb;
- out << sp << nl << "public static " << name << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "public static " << name << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << "int v = istr.readEnum(" << p->maxValue() << ");";
@@ -4041,7 +4041,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
string optName = "java.util.Optional<" + name + ">";
out << sp;
- out << nl << "public static void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << optName << " v)";
out << sb;
out << nl << "if(v != null && v.isPresent())";
@@ -4051,7 +4051,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << sp;
- out << nl << "public static void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << name << " v)";
out << sb;
out << nl << "if(ostr.writeOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4061,7 +4061,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << sp;
- out << nl << "public static " << optName << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << optName << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
out << nl << "if(istr.readOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4079,7 +4079,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << nl << "final " << name << " e = valueOf(v);";
out << nl << "if(e == null)";
out << sb;
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.MarshalException", package)
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.MarshalException", package)
<< "(\"enumerator value \" + v + \" is out of range\");";
out << eb;
out << nl << "return e;";
@@ -4097,7 +4097,7 @@ Slice::Gen::TypesVisitor::visitConst(const ConstPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
TypePtr type = p->type();
open(absolute, p->file());
@@ -4201,8 +4201,8 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
}
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
string typeS = typeToString(p, TypeModeIn, package);
@@ -4265,7 +4265,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, " << typeS << " v)";
out << sb;
iter = 0;
@@ -4277,7 +4277,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
{
out << nl << "@SuppressWarnings(\"unchecked\")";
}
- out << nl << "public static " << typeS << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << typeS << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << "final " << typeS << " v;";
@@ -4290,7 +4290,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
string optTypeS = "java.util.Optional<" + typeS + ">";
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << optTypeS << " v)";
out << sb;
if(!hasTypeMetaData(p) && builtin && builtin->kind() < Builtin::KindObject)
@@ -4307,7 +4307,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << eb;
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << typeS << " v)";
out << sb;
if(!hasTypeMetaData(p) && builtin && builtin->kind() < Builtin::KindObject)
@@ -4356,7 +4356,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << eb;
out << sp;
- out << nl << "public static " << optTypeS << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << optTypeS << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
if(!hasTypeMetaData(p) && builtin && builtin->kind() < Builtin::KindObject)
@@ -4405,8 +4405,8 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
TypePtr value = p->valueType();
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
StringList metaData = p->getMetaData();
string formalType = typeToString(p, TypeModeIn, package, StringList(), true);
@@ -4419,14 +4419,14 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr, "
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr, "
<< formalType << " v)";
out << sb;
iter = 0;
writeDictionaryMarshalUnmarshalCode(out, package, p, "v", true, iter, false);
out << eb;
- out << sp << nl << "public static " << formalType << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "public static " << formalType << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << formalType << " v;";
@@ -4437,7 +4437,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
string optTypeS = "java.util.Optional<" + formalType + ">";
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
<< optTypeS << " v)";
out << sb;
out << nl << "if(v != null && v.isPresent())";
@@ -4447,7 +4447,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << eb;
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
<< formalType << " v)";
out << sb;
out << nl << "if(ostr.writeOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4471,7 +4471,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << eb;
out << sp;
- out << nl << "public static " << optTypeS << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << optTypeS << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
out << nl << "if(istr.readOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4523,7 +4523,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "Prx");
+ string absolute = getUnqualified(p, "", "", "Prx");
open(absolute, p->file());
@@ -4552,7 +4552,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
out.useCurrentPosAsIndent();
if(bases.empty())
{
- out << getAbsolute("com.zeroc.Ice.ObjectPrx", package);
+ out << getUnqualified("com.zeroc.Ice.ObjectPrx", package);
}
else
{
@@ -4562,7 +4562,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << ',' << nl;
}
- out << getAbsolute(*q, package, "", "Prx");
+ out << getUnqualified(*q, package, "", "Prx");
}
}
out.restoreIndent();
@@ -4588,10 +4588,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"Raises a local exception if a communication error occurs.\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(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package) << "._checkedCast(obj, ice_staticId(), "
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package) << "._checkedCast(obj, ice_staticId(), "
<< p->name() << "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4602,10 +4602,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@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(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, " << contextParam << ')';
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< "._checkedCast(obj, context, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4616,10 +4616,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@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(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< "._checkedCast(obj, facet, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4631,10 +4631,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@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(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, String facet, " << contextParam << ')';
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< "._checkedCast(obj, facet, context, ice_staticId(), " << p->name()
<< "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4644,10 +4644,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"Downcasts the given proxy to this type without contacting the remote server.\n"
"@param obj The untyped proxy.\n"
"@return A proxy for this type.");
- out << nl << "static " << p->name() << "Prx uncheckedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx uncheckedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, " << p->name()
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, " << p->name()
<< "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4657,10 +4657,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@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(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx uncheckedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, facet, "
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, facet, "
<< p->name() << "Prx.class, _"
<< p->name() << "PrxI.class);";
out << eb;
@@ -4693,7 +4693,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param newEndpoints The endpoints for the new proxy.\n"
"@return A proxy with the specified endpoints.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_endpoints(" << getAbsolute("com.zeroc.Ice.Endpoint", package) << "[] newEndpoints)";
+ out << nl << "default " << p->name() << "Prx ice_endpoints(" << getUnqualified("com.zeroc.Ice.Endpoint", package) << "[] newEndpoints)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_endpoints(newEndpoints);";
out << eb;
@@ -4738,7 +4738,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@return A proxy with the specified endpoint selection policy.");
out << nl << "@Override";
out << nl << "default " << p->name() << "Prx ice_endpointSelection("
- << getAbsolute("com.zeroc.Ice.EndpointSelectionType", package)
+ << getUnqualified("com.zeroc.Ice.EndpointSelectionType", package)
<< " newType)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_endpointSelection(newType);";
@@ -4763,7 +4763,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param e The encoding version to use to marshal request parameters.\n"
"@return A proxy with the specified encoding version.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_encodingVersion(" << getAbsolute("com.zeroc.Ice.EncodingVersion", package)
+ out << nl << "default " << p->name() << "Prx ice_encodingVersion(" << getUnqualified("com.zeroc.Ice.EncodingVersion", package)
<< " e)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_encodingVersion(e);";
@@ -4788,7 +4788,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param router The router for the new proxy.\n"
"@return A proxy with the specified router.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_router(" << getAbsolute("com.zeroc.Ice.RouterPrx", package) << " router)";
+ out << nl << "default " << p->name() << "Prx ice_router(" << getUnqualified("com.zeroc.Ice.RouterPrx", package) << " router)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_router(router);";
out << eb;
@@ -4799,7 +4799,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param locator The locator for the new proxy.\n"
"@return A proxy with the specified locator.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_locator(" << getAbsolute("com.zeroc.Ice.LocatorPrx", package)
+ out << nl << "default " << p->name() << "Prx ice_locator(" << getUnqualified("com.zeroc.Ice.LocatorPrx", package)
<< " locator)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_locator(locator);";
@@ -4920,7 +4920,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
out << eb;
close();
- string absolute = getAbsolute(p, "", "_", "PrxI");
+ string absolute = getUnqualified(p, "", "_", "PrxI");
open(absolute, p->file());
@@ -4931,7 +4931,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
outi << nl << "@Deprecated";
}
- outi << nl << "public class _" << p->name() << "PrxI extends " << getAbsolute("com.zeroc.Ice._ObjectPrxI", package)
+ outi << nl << "public class _" << p->name() << "PrxI extends " << getUnqualified("com.zeroc.Ice._ObjectPrxI", package)
<< " implements " << p->name() << "Prx";
outi << sb;
outi << sp << nl << "public static final long serialVersionUID = 0L;";
@@ -5035,15 +5035,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
out << eb;
for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t)
{
- string exS = getAbsolute(*t, package);
+ string exS = getUnqualified(*t, package);
out << nl << "catch(" << exS << " ex)";
out << sb;
out << nl << "throw ex;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("com.zeroc.Ice.UserException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("com.zeroc.Ice.UserException", package) << " ex)";
out << sb;
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.UnknownUserException", package) << "(ex.ice_id(), ex);";
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.UnknownUserException", package) << "(ex.ice_id(), ex);";
out << eb;
}
out << eb;
@@ -5101,15 +5101,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
out << eb;
for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t)
{
- string exS = getAbsolute(*t, package);
+ string exS = getUnqualified(*t, package);
out << nl << "catch(" << exS << " ex)";
out << sb;
out << nl << "throw ex;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("com.zeroc.Ice.UserException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("com.zeroc.Ice.UserException", package) << " ex)";
out << sb;
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.UnknownUserException", package)
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.UnknownUserException", package)
<< "(ex.ice_id(), ex);";
out << eb;
}
@@ -5153,7 +5153,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
<< "java.util.Map<String, String> context"
<< "boolean sync" << epar;
out << sb;
- out << nl << futureImpl << " f = new " << getAbsolute("com.zeroc.IceInternal.OutgoingAsync", package)
+ out << nl << futureImpl << " f = new " << getUnqualified("com.zeroc.IceInternal.OutgoingAsync", package)
<< "<>(this, \"" << p->name() << "\", " << sliceModeToIceMode(p->sendMode()) << ", sync, "
<< (throws.empty() ? "null" : "_iceE_" + p->name()) << ");";
@@ -5201,7 +5201,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
out << ",";
}
- out << nl << getAbsolute(*t, package) << ".class";
+ out << nl << getUnqualified(*t, package) << ".class";
}
out << eb << ';';
}
@@ -5240,7 +5240,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
<< "java.util.Map<String, String> context"
<< "boolean sync" << epar;
out << sb;
- out << nl << futureImpl << " f = new " << getAbsolute("com.zeroc.IceInternal.OutgoingAsync", package)
+ out << nl << futureImpl << " f = new " << getUnqualified("com.zeroc.IceInternal.OutgoingAsync", package)
<< "<>(this, \"" << p->name() << "\", " << sliceModeToIceMode(p->sendMode()) << ", sync, "
<< (throws.empty() ? "null" : "_iceE_" + p->name()) << ");";
@@ -5293,7 +5293,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
}
const string name = p->name();
- const string absolute = getAbsolute(p, "", "", "Disp");
+ const string absolute = getUnqualified(p, "", "", "Disp");
const string package = getPackage(p);
open(absolute, p->file());
@@ -5320,7 +5320,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
if(bases.empty())
{
- out << " extends " << getAbsolute("com.zeroc.Ice.Object", package);
+ out << " extends " << getUnqualified("com.zeroc.Ice.Object", package);
}
else
{
@@ -5334,11 +5334,11 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
}
if(!(*q)->isInterface())
{
- out << getAbsolute(*q, package, "", "Disp");
+ out << getUnqualified(*q, package, "", "Disp");
}
else
{
- out << getAbsolute(*q, package);
+ out << getUnqualified(*q, package);
}
}
out.restoreIndent();
@@ -5369,7 +5369,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "I");
+ string absolute = getUnqualified(p, "", "", "I");
open(absolute, p->file());
@@ -5490,7 +5490,7 @@ Slice::Gen::ImplVisitor::getDefaultValue(const string& package, const TypePtr& t
if(en)
{
EnumeratorList enumerators = en->enumerators();
- return getAbsolute(en, package) + '.' + fixKwd(enumerators.front()->name());
+ return getUnqualified(en, package) + '.' + fixKwd(enumerators.front()->name());
}
}
}
@@ -5577,7 +5577,7 @@ Slice::Gen::ImplVisitor::writeOperation(Output& out, const string& package, cons
const ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
const vector<string> params = getParams(op, package);
- const string currentParam = getAbsolute("com.zeroc.Ice.Current", package) + " " + getEscapedParamName(op, "current");
+ const string currentParam = getUnqualified("com.zeroc.Ice.Current", package) + " " + getEscapedParamName(op, "current");
if(local)
{
diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp
index ad41d4f4a44..0aae4ac5353 100644
--- a/cpp/src/slice2java/GenCompat.cpp
+++ b/cpp/src/slice2java/GenCompat.cpp
@@ -313,7 +313,7 @@ Slice::JavaCompatVisitor::getParamsAsync(const OperationPtr& op, const string& p
string name = op->name();
ContainerPtr container = op->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
- string classNameAsync = getAbsolute(cl, package, amd ? "AMD_" : "AMI_", '_' + name);
+ string classNameAsync = getUnqualified(cl, package, amd ? "AMD_" : "AMI_", '_' + name);
params.insert(params.begin(), classNameAsync + " " + getEscapedParamName(op, "cb"));
return params;
@@ -372,7 +372,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackInterface(const OperationPtr& op, cons
if(!ret && outParams.empty())
{
- return throws ? getAbsolute("Ice.TwowayCallbackVoidUE", package) : getAbsolute("Ice.OnewayCallback", package);
+ return throws ? getUnqualified("Ice.TwowayCallbackVoidUE", package) : getUnqualified("Ice.OnewayCallback", package);
}
else if((ret && outParams.empty()) || (!ret && outParams.size() == 1))
{
@@ -392,7 +392,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackInterface(const OperationPtr& op, cons
case Builtin::KindFloat:
case Builtin::KindDouble:
{
- return getAbsolute(prefix + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
+ return getUnqualified(prefix + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
}
default:
{
@@ -401,13 +401,13 @@ Slice::JavaCompatVisitor::getAsyncCallbackInterface(const OperationPtr& op, cons
}
}
- return getAbsolute("Ice.TwowayCallbackArg1" + suffix, package) + "<" +
+ return getUnqualified("Ice.TwowayCallbackArg1" + suffix, package) + "<" +
typeToString(t, TypeModeIn, package, op->getMetaData(), true, optional) + ">";
}
else
{
ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container());
- return getAbsolute(getPackage(cl) + "._Callback_" + cl->name(), package) + "_" + op->name();
+ return getUnqualified(getPackage(cl) + "._Callback_" + cl->name(), package) + "_" + op->name();
}
}
@@ -426,7 +426,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackBaseClass(const OperationPtr& op, bool
assert(throws);
return functional ?
"IceInternal.Functional_TwowayCallbackVoidUE" :
- "IceInternal.TwowayCallback implements " + getAbsolute("Ice.TwowayCallbackVoidUE", package);
+ "IceInternal.TwowayCallback implements " + getUnqualified("Ice.TwowayCallbackVoidUE", package);
}
else if((ret && outParams.empty()) || (!ret && outParams.size() == 1))
{
@@ -453,7 +453,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackBaseClass(const OperationPtr& op, bool
else
{
os << "IceInternal.TwowayCallback implements "
- << getAbsolute(string("Ice.") + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
+ << getUnqualified(string("Ice.") + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
}
return os.str();
}
@@ -471,7 +471,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackBaseClass(const OperationPtr& op, bool
}
else
{
- os << "IceInternal.TwowayCallback implements " << getAbsolute("Ice.TwowayCallbackArg1", package);
+ os << "IceInternal.TwowayCallback implements " << getUnqualified("Ice.TwowayCallbackArg1", package);
}
os << suffix << "<" << typeToString(t, TypeModeIn, getPackage(op), op->getMetaData(), true, optional) + ">";
return os.str();
@@ -580,11 +580,11 @@ Slice::JavaCompatVisitor::getParamsAsyncLambda(const OperationPtr& op, const str
if(!op->throws().empty())
{
- params.push_back("IceInternal.Functional_GenericCallback1<" + getAbsolute("Ice.UserException", package) + "> " +
+ params.push_back("IceInternal.Functional_GenericCallback1<" + getUnqualified("Ice.UserException", package) + "> " +
userExceptionCbParamName);
}
- params.push_back("IceInternal.Functional_GenericCallback1<" + getAbsolute("Ice.Exception", package) + "> " +
+ params.push_back("IceInternal.Functional_GenericCallback1<" + getUnqualified("Ice.Exception", package) + "> " +
exceptionCbParamName);
if(sentCB)
@@ -830,7 +830,7 @@ Slice::JavaCompatVisitor::writeThrowsClause(const string& package, const Excepti
{
ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container());
out.inc();
- out << nl << "throws " << getAbsolute("Ice.UserException", getPackage(cl));
+ out << nl << "throws " << getUnqualified("Ice.UserException", getPackage(cl));
out.dec();
}
else if(throws.size() > 0)
@@ -845,7 +845,7 @@ Slice::JavaCompatVisitor::writeThrowsClause(const string& package, const Excepti
{
out << "," << nl;
}
- out << getAbsolute(*r, package);
+ out << getUnqualified(*r, package);
count++;
}
out.restoreIndent();
@@ -925,7 +925,7 @@ void
Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const DataMemberList& classMembers,
const DataMemberList& optionalMembers)
{
- out << sp << nl << "private class Patcher implements " << getAbsolute("Ice.ReadValueCallback", package);
+ out << sp << nl << "private class Patcher implements " << getUnqualified("Ice.ReadValueCallback", package);
out << sb;
if(classMembers.size() > 1)
{
@@ -935,7 +935,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const
out << eb;
}
- out << sp << nl << "public void" << nl << "valueReady(" << getAbsolute("Ice.Object", package) << " v)";
+ out << sp << nl << "public void" << nl << "valueReady(" << getUnqualified("Ice.Object", package) << " v)";
out << sb;
if(classMembers.size() > 1)
{
@@ -963,7 +963,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const
out.inc();
if(b)
{
- out << nl << "_typeId = " << getAbsolute("Ice.ObjectImpl", package) << ".ice_staticId();";
+ out << nl << "_typeId = " << getUnqualified("Ice.ObjectImpl", package) << ".ice_staticId();";
}
else
{
@@ -1017,7 +1017,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const
out.inc();
if(b)
{
- out << nl << "_typeId = " << getAbsolute("Ice.ObjectImpl", package) << ".ice_staticId();";
+ out << nl << "_typeId = " << getUnqualified("Ice.ObjectImpl", package) << ".ice_staticId();";
}
else
{
@@ -1126,7 +1126,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "return java.util.Arrays.binarySearch(_ids, s) >= 0;";
out << eb;
- out << sp << nl << "public boolean ice_isA(String s, " << getAbsolute("Ice.Current", package) << " current)";
+ out << sp << nl << "public boolean ice_isA(String s, " << getUnqualified("Ice.Current", package) << " current)";
out << sb;
out << nl << "return java.util.Arrays.binarySearch(_ids, s) >= 0;";
out << eb;
@@ -1136,7 +1136,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "return _ids;";
out << eb;
- out << sp << nl << "public String[] ice_ids(" << getAbsolute("Ice.Current", package) << " current)";
+ out << sp << nl << "public String[] ice_ids(" << getUnqualified("Ice.Current", package) << " current)";
out << sb;
out << nl << "return _ids;";
out << eb;
@@ -1146,7 +1146,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "return _ids[" << scopedPos << "];";
out << eb;
- out << sp << nl << "public String ice_id(" << getAbsolute("Ice.Current", package) << " current)";
+ out << sp << nl << "public String ice_id(" << getUnqualified("Ice.Current", package) << " current)";
out << sb;
out << nl << "return _ids[" << scopedPos << "];";
out << eb;
@@ -1281,9 +1281,9 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << sp;
writeSuppressDeprecation(out, op);
out << nl << "public static boolean _iceD_" << opName << '(' << name
- << " obj, IceInternal.Incoming inS, " << getAbsolute("Ice.Current", package) << " current)";
+ << " obj, IceInternal.Incoming inS, " << getUnqualified("Ice.Current", package) << " current)";
out.inc();
- out << nl << "throws " << getAbsolute("Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("Ice.UserException", package);
out.dec();
out << sb;
@@ -1319,7 +1319,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
//
// Unmarshal 'in' parameters.
//
- out << nl << getAbsolute("Ice.InputStream", package) << " istr = inS.startReadParams();";
+ out << nl << getUnqualified("Ice.InputStream", package) << " istr = inS.startReadParams();";
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
TypePtr paramType = (*pli)->type();
@@ -1410,7 +1410,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
//
if(!outParams.empty() || ret)
{
- out << nl << getAbsolute("Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
+ out << nl << getUnqualified("Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true, "", true);
if(op->returnsClasses(false))
{
@@ -1447,7 +1447,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
//
// Unmarshal 'in' parameters.
//
- out << nl << getAbsolute("Ice.InputStream", package) << " istr = inS.startReadParams();";
+ out << nl << getUnqualified("Ice.InputStream", package) << " istr = inS.startReadParams();";
iter = 0;
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
@@ -1569,7 +1569,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "int pos = java.util.Arrays.binarySearch(_all, current.operation);";
out << nl << "if(pos < 0)";
out << sb;
- out << nl << "throw new " << getAbsolute("Ice.OperationNotExistException", package)
+ out << nl << "throw new " << getUnqualified("Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
out << sp << nl << "switch(pos)";
@@ -1618,11 +1618,11 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
string base;
if(cl->isInterface())
{
- base = getAbsolute(cl, package, "_", "Disp");
+ base = getUnqualified(cl, package, "_", "Disp");
}
else
{
- base = getAbsolute(cl, package);
+ base = getUnqualified(cl, package);
}
out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);";
}
@@ -1634,7 +1634,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
}
out << eb;
out << sp << nl << "assert(false);";
- out << nl << "throw new " << getAbsolute("Ice.OperationNotExistException", package)
+ out << nl << "throw new " << getUnqualified("Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
@@ -1694,19 +1694,19 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
if(preserved && !basePreserved)
{
- out << sp << nl << "public " << getAbsolute("Ice.SlicedData", package) << " ice_getSlicedData()";
+ out << sp << nl << "public " << getUnqualified("Ice.SlicedData", package) << " ice_getSlicedData()";
out << sb;
out << nl << "return _iceSlicedData;";
out << eb;
- out << sp << nl << "public void _iceWrite(" << getAbsolute("Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void _iceWrite(" << getUnqualified("Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startValue(_iceSlicedData);";
out << nl << "_iceWriteImpl(ostr);";
out << nl << "ostr.endValue();";
out << eb;
- out << sp << nl << "public void _iceRead(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public void _iceRead(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startValue();";
out << nl << "_iceReadImpl(istr);";
@@ -1714,7 +1714,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << eb;
}
- out << sp << nl << "protected void _iceWriteImpl(" << getAbsolute("Ice.OutputStream", package) << " ostr_)";
+ out << sp << nl << "protected void _iceWriteImpl(" << getUnqualified("Ice.OutputStream", package) << " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
iter = 0;
@@ -1744,7 +1744,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
writePatcher(out, package, classMembers, optionalMembers);
}
- out << sp << nl << "protected void _iceReadImpl(" << getAbsolute("Ice.InputStream", package) << " istr_)";
+ out << sp << nl << "protected void _iceReadImpl(" << getUnqualified("Ice.InputStream", package) << " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
@@ -1771,7 +1771,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("Ice.SlicedData", package) << " _iceSlicedData;";
+ out << sp << nl << "protected " << getUnqualified("Ice.SlicedData", package) << " _iceSlicedData;";
}
}
@@ -1782,7 +1782,7 @@ Slice::JavaCompatVisitor::writeConstantValue(Output& out, const TypePtr& type, c
ConstPtr constant = ConstPtr::dynamicCast(valueType);
if(constant)
{
- out << getAbsolute(constant, package) << ".value";
+ out << getUnqualified(constant, package) << ".value";
}
else
{
@@ -1835,7 +1835,7 @@ Slice::JavaCompatVisitor::writeConstantValue(Output& out, const TypePtr& type, c
{
EnumeratorPtr lte = EnumeratorPtr::dynamicCast(valueType);
assert(lte);
- out << getAbsolute(lte, package);
+ out << getUnqualified(lte, package);
}
else
{
@@ -1879,7 +1879,7 @@ Slice::JavaCompatVisitor::writeDataMemberInitializers(Output& out, const DataMem
if(en)
{
string firstEnum = fixKwd(en->enumerators().front()->name());
- out << nl << "this." << fixKwd((*p)->name()) << " = " << getAbsolute(en, package) << '.' << firstEnum
+ out << nl << "this." << fixKwd((*p)->name()) << " = " << getUnqualified(en, package) << '.' << firstEnum
<< ';';
}
@@ -2516,7 +2516,7 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre
{
opIntfName += "NC";
}
- string absolute = getAbsolute(p, "", "_", opIntfName);
+ string absolute = getUnqualified(p, "", "_", opIntfName);
open(absolute, p->file());
@@ -2545,7 +2545,7 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre
{
first = false;
}
- out << getAbsolute(*q, package, "_", opIntfName);
+ out << getUnqualified(*q, package, "_", opIntfName);
}
++q;
}
@@ -2603,7 +2603,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 << getAbsolute("Ice.Current", package) + " " + currentParamName;
+ out << getUnqualified("Ice.Current", package) + " " + currentParamName;
}
out << epar;
writeThrowsClause(package, throws, op);
@@ -2657,7 +2657,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -2699,12 +2699,12 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << '_' << name << "Operations, _" << name << "OperationsNC";
if(bases.empty())
{
- out << "," << nl << getAbsolute("Ice.Object", package);
+ out << "," << nl << getUnqualified("Ice.Object", package);
}
}
else if(q != bases.end())
{
- out << getAbsolute(*q++, package);
+ out << getUnqualified(*q++, package);
}
else if(r != implements.end())
{
@@ -2713,7 +2713,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
for(;q != bases.end(); ++q)
{
- out << ',' << nl << getAbsolute(*q, package);
+ out << ',' << nl << getUnqualified(*q, package);
}
for(; r != implements.end(); ++r)
{
@@ -2733,12 +2733,12 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(baseClass)
{
- out << " extends " << getAbsolute(baseClass, package);
+ out << " extends " << getUnqualified(baseClass, package);
bases.pop_front();
}
else if(!p->isLocal())
{
- out << " extends " << getAbsolute("Ice.ObjectImpl", package);
+ out << " extends " << getUnqualified("Ice.ObjectImpl", package);
}
else
{
@@ -2752,7 +2752,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q)
{
- implements.push_back(getAbsolute(*q, package));
+ implements.push_back(getUnqualified(*q, package));
}
if(!implements.empty())
@@ -2831,7 +2831,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "public abstract ";
}
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << epar << ';';
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << epar << ';';
out << sp;
writeDocCommentAMI(out, op, InParam, "@param " + getEscapedParamName(op, "cb") + " A generic callback.");
@@ -2840,7 +2840,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "public abstract ";
}
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams
<< ("Ice.Callback " + getEscapedParamName(op, "cb")) << epar << ';';
out << sp;
@@ -2851,7 +2851,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << "public abstract ";
}
string cb = "Callback_" + name + "_" + opname + " " + getEscapedParamName(op, "cb");
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << cb << epar
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << cb << epar
<< ';';
out << sp;
@@ -2864,7 +2864,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "public abstract ";
}
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname;
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname;
writeParamList(out, getParamsAsyncLambda(op, package, false, true));
out << ';';
@@ -2878,7 +2878,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
out << retS << " end_" << opname << spar << outParams
- << (getAbsolute("Ice.AsyncResult", package) + " " + getEscapedParamName(op, "result")) << epar << ';';
+ << (getUnqualified("Ice.AsyncResult", package) + " " + getEscapedParamName(op, "result")) << epar << ';';
}
}
}
@@ -3029,17 +3029,17 @@ 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 " << getAbsolute("Ice.ValueFactory", package);
+ out << nl << "private static class _F implements " << getUnqualified("Ice.ValueFactory", package);
out << sb;
- out << nl << "public " << getAbsolute("Ice.Object", package) << " create(String type)";
+ out << nl << "public " << getUnqualified("Ice.Object", package) << " create(String type)";
out << sb;
out << nl << "assert(type.equals(ice_staticId()));";
out << nl << "return new " << fixKwd(name) << "();";
out << eb;
out << eb;
- out << nl << "private static " << getAbsolute("Ice.ValueFactory", package) << " _factory = new _F();";
+ out << nl << "private static " << getUnqualified("Ice.ValueFactory", package) << " _factory = new _F();";
out << sp;
- out << nl << "public static " << getAbsolute("Ice.ValueFactory", package) << nl << "ice_factory()";
+ out << nl << "public static " << getUnqualified("Ice.ValueFactory", package) << nl << "ice_factory()";
out << sb;
out << nl << "return _factory;";
out << eb;
@@ -3150,7 +3150,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
string scoped = p->scoped();
ExceptionPtr base = p->base();
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -3168,16 +3168,16 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
if(p->isLocal())
{
- out << getAbsolute("Ice.LocalException", package);
+ out << getUnqualified("Ice.LocalException", package);
}
else
{
- out << getAbsolute("Ice.UserException", package);
+ out << getUnqualified("Ice.UserException", package);
}
}
else
{
- out << getAbsolute(base, package);
+ out << getUnqualified(base, package);
}
out << sb;
@@ -3439,19 +3439,19 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
out << sp;
- out << nl << "public " << getAbsolute("Ice.SlicedData", package) << " " << nl << "ice_getSlicedData()";
+ out << nl << "public " << getUnqualified("Ice.SlicedData", package) << " " << nl << "ice_getSlicedData()";
out << sb;
out << nl << "return _slicedData;";
out << eb;
- out << sp << nl << "public void" << nl << "_write(" << getAbsolute("Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void" << nl << "_write(" << getUnqualified("Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startException(_slicedData);";
out << nl << "_writeImpl(ostr);";
out << nl << "ostr.endException();";
out << eb;
- out << sp << nl << "public void" << nl << "_read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public void" << nl << "_read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startException();";
out << nl << "_readImpl(istr);";
@@ -3459,7 +3459,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << eb;
}
- out << sp << nl << "protected void" << nl << "_writeImpl(" << getAbsolute("Ice.OutputStream", package)
+ out << sp << nl << "protected void" << nl << "_writeImpl(" << getUnqualified("Ice.OutputStream", package)
<< " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
@@ -3489,7 +3489,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
writePatcher(out, package, classMembers, optionalMembers);
}
- out << sp << nl << "protected void" << nl << "_readImpl(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "protected void" << nl << "_readImpl(" << getUnqualified("Ice.InputStream", package)
<< " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
@@ -3527,7 +3527,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("Ice.SlicedData", package) << " _slicedData;";
+ out << sp << nl << "protected " << getUnqualified("Ice.SlicedData", package) << " _slicedData;";
}
}
@@ -3578,7 +3578,7 @@ bool
Slice::GenCompat::TypesVisitor::visitStructStart(const StructPtr& p)
{
string name = fixKwd(p->name());
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
open(absolute, p->file());
@@ -3798,7 +3798,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void" << nl << "ice_writeMembers(" << getAbsolute("Ice.OutputStream", package)
+ out << sp << nl << "public void" << nl << "ice_writeMembers(" << getUnqualified("Ice.OutputStream", package)
<< " ostr)";
out << sb;
iter = 0;
@@ -3815,7 +3815,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
writePatcher(out, package, classMembers, DataMemberList());
}
- out << sp << nl << "public void" << nl << "ice_readMembers(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "public void" << nl << "ice_readMembers(" << getUnqualified("Ice.InputStream", package)
<< " istr)";
out << sb;
iter = 0;
@@ -3827,7 +3827,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
}
out << eb;
- out << sp << nl << "static public void" << nl << "ice_write(" << getAbsolute("Ice.OutputStream", package)
+ out << sp << nl << "static public void" << nl << "ice_write(" << getUnqualified("Ice.OutputStream", package)
<< " ostr, " << name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -3840,7 +3840,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << eb;
- out << sp << nl << "static public " << name << nl << "ice_read(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "static public " << name << nl << "ice_read(" << getUnqualified("Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << name << " v = new " << name << "();";
@@ -4177,7 +4177,7 @@ void
Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
{
string name = fixKwd(p->name());
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
string package = getPackage(p);
EnumeratorList enumerators = p->enumerators();
@@ -4237,12 +4237,12 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void ice_write(" << getAbsolute("Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void ice_write(" << getUnqualified("Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.writeEnum(_value, " << p->maxValue() << ");";
out << eb;
- out << sp << nl << "public static void ice_write(" << getAbsolute("Ice.OutputStream", package) << " ostr, "
+ out << sp << nl << "public static void ice_write(" << getUnqualified("Ice.OutputStream", package) << " ostr, "
<< name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -4256,7 +4256,7 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << eb;
- out << sp << nl << "public static " << name << " ice_read(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "public static " << name << " ice_read(" << getUnqualified("Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << "int v = istr.readEnum(" << p->maxValue() << ");";
@@ -4268,7 +4268,7 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
out << nl << "final " << name << " e = valueOf(v);";
out << nl << "if(e == null)";
out << sb;
- out << nl << "throw new " << getAbsolute("Ice.MarshalException", package)
+ out << nl << "throw new " << getUnqualified("Ice.MarshalException", package)
<< "(\"enumerator value \" + v + \" is out of range\");";
out << eb;
out << nl << "return e;";
@@ -4286,7 +4286,7 @@ Slice::GenCompat::TypesVisitor::visitConst(const ConstPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
TypePtr type = p->type();
open(absolute, p->file());
@@ -4369,7 +4369,7 @@ Slice::GenCompat::HolderVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isLocal())
{
string name = p->name();
- string absolute = getAbsolute(p, "", "", "PrxHolder");
+ string absolute = getUnqualified(p, "", "", "PrxHolder");
open(absolute, p->file());
Output& out = output();
@@ -4426,7 +4426,7 @@ Slice::GenCompat::HolderVisitor::writeHolder(const TypePtr& p)
assert(contained);
string name = contained->name();
string package = getPackage(contained);
- string absolute = getAbsolute(contained, "", "", "Holder");
+ string absolute = getUnqualified(contained, "", "", "Holder");
string file;
if(p->definitionContext())
@@ -4449,10 +4449,10 @@ Slice::GenCompat::HolderVisitor::writeHolder(const TypePtr& p)
out << nl << "public final class " << name << "Holder";
if(!p->isLocal() && ((builtin && builtin->kind() == Builtin::KindObject) || cl))
{
- out << " extends " << getAbsolute("Ice.ObjectHolderBase", package) << "<" << typeS << ">";
+ out << " extends " << getUnqualified("Ice.ObjectHolderBase", package) << "<" << typeS << ">";
}
else {
- out << " extends " << getAbsolute("Ice.Holder", package) << "<" << typeS << ">";
+ out << " extends " << getUnqualified("Ice.Holder", package) << "<" << typeS << ">";
}
out << sb;
if(!p->isLocal() && ((builtin && builtin->kind() == Builtin::KindObject) || cl))
@@ -4466,7 +4466,7 @@ Slice::GenCompat::HolderVisitor::writeHolder(const TypePtr& p)
out << eb;
out << sp << nl << "public void";
- out << nl << "valueReady(" << getAbsolute("Ice.Object", package) << " v)";
+ out << nl << "valueReady(" << getUnqualified("Ice.Object", package) << " v)";
out << sb;
out << nl << "if(v == null || v instanceof " << typeS << ")";
out << sb;
@@ -4529,9 +4529,9 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
string scoped = p->scoped();
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
- open(getAbsolute(p, "", "", "PrxHelper"), p->file());
+ open(getUnqualified(p, "", "", "PrxHelper"), p->file());
Output& out = output();
OperationList ops = p->allOperations();
@@ -4556,7 +4556,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
out << nl << "public final class " << name << "PrxHelper extends "
- << getAbsolute("Ice.ObjectPrxHelperBase", package) << " implements " << name << "Prx";
+ << getUnqualified("Ice.ObjectPrxHelperBase", package) << " implements " << name << "Prx";
out << sb;
@@ -4600,7 +4600,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << sp;
const string iresultParamName = getEscapedParamName(op, "iresult");
out << nl << "public " << retS << " end_" << op->name() << spar << outParams
- << (getAbsolute("Ice.AsyncResult", package) + " " + iresultParamName) << epar;
+ << (getUnqualified("Ice.AsyncResult", package) + " " + iresultParamName) << epar;
writeThrowsClause(package, throws);
out << sb;
if(op->returnsData())
@@ -4629,20 +4629,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(" << getUnqualified(*eli, package) << " ex_)";
out << sb;
out << nl << "throw ex_;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("Ice.UserException", package) << " ex_)";
+ out << nl << "catch(" << getUnqualified("Ice.UserException", package) << " ex_)";
out << sb;
- out << nl << "throw new " << getAbsolute("Ice.UnknownUserException", package) << "(ex_.ice_id(), ex_);";
+ out << nl << "throw new " << getUnqualified("Ice.UnknownUserException", package) << "(ex_.ice_id(), ex_);";
out << eb;
out << eb;
if(ret || !outParams.empty())
{
- out << nl << getAbsolute("Ice.InputStream", package) << " istr_ = result_.startReadParams();";
+ out << nl << getUnqualified("Ice.InputStream", package) << " istr_ = result_.startReadParams();";
const ParamDeclList paramList = op->parameters();
ParamDeclList pl;
for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
@@ -4712,8 +4712,8 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
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 << getUnqualified(cl, "", "", "Prx") << " _proxy = ("
+ << getUnqualified(cl, "", "", "Prx") << ")result.getProxy();";
TypePtr ret = op->returnType();
if(ret)
@@ -4741,18 +4741,18 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << eb;
if(!throws.empty())
{
- out << nl << "catch(" << getAbsolute("Ice.UserException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.UserException", package) << " ex)";
out << sb;
out << nl << "cb.exception(ex);";
out << nl << "return;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("Ice.LocalException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.LocalException", package) << " ex)";
out << sb;
out << nl << "cb.exception(ex);";
out << nl << "return;";
out << eb;
- out << nl << "catch(" << getAbsolute("Ice.SystemException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.SystemException", package) << " ex)";
out << sb;
out << nl << "cb.exception(ex);";
out << nl << "return;";
@@ -4786,7 +4786,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"Raises a local exception if a communication error occurs.\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(" << getAbsolute("Ice.ObjectPrx", package) << " obj)";
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package) << " obj)";
out << sb;
out << nl << "return checkedCastImpl(obj, ice_staticId(), " << name << "Prx.class, "
<< name << "PrxHelper.class);";
@@ -4799,7 +4799,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@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(" << getAbsolute("Ice.ObjectPrx", package) << " obj, "
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package) << " obj, "
<< contextParam << ')';
out << sb;
out << nl << "return checkedCastImpl(obj, context, ice_staticId(), " << name
@@ -4813,7 +4813,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@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(" << getAbsolute("Ice.ObjectPrx", package)
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
out << nl << "return checkedCastImpl(obj, facet, ice_staticId(), " << name
@@ -4828,7 +4828,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@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(" << getAbsolute("Ice.ObjectPrx", package)
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package)
<< " obj, String facet, " << contextParam << ')';
out << sb;
out << nl << "return checkedCastImpl(obj, facet, context, ice_staticId(), " << name
@@ -4840,7 +4840,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"Downcasts the given proxy to this type without contacting the remote server.\n"
"@param obj The untyped proxy.\n"
"@return A proxy for this type.");
- out << nl << "public static " << name << "Prx uncheckedCast(" << getAbsolute("Ice.ObjectPrx", package) << " obj)";
+ out << nl << "public static " << name << "Prx uncheckedCast(" << getUnqualified("Ice.ObjectPrx", package) << " obj)";
out << sb;
out << nl << "return uncheckedCastImpl(obj, " << name << "Prx.class, " << name
<< "PrxHelper.class);";
@@ -4852,7 +4852,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@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(" << getAbsolute("Ice.ObjectPrx", package)
+ out << nl << "public static " << name << "Prx uncheckedCast(" << getUnqualified("Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
out << nl << "return uncheckedCastImpl(obj, facet, " << name << "Prx.class, " << name
@@ -4896,15 +4896,15 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "return _ids[" << scopedPos << "];";
out << eb;
- out << sp << nl << "public static void write(" << getAbsolute("Ice.OutputStream", package) << " ostr, " << name
+ out << sp << nl << "public static void write(" << getUnqualified("Ice.OutputStream", package) << " ostr, " << name
<< "Prx v)";
out << sb;
out << nl << "ostr.writeProxy(v);";
out << eb;
- out << sp << nl << "public static " << name << "Prx read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public static " << name << "Prx read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
- out << nl << getAbsolute("Ice.ObjectPrx", package) << " proxy = istr.readProxy();";
+ out << nl << getUnqualified("Ice.ObjectPrx", package) << " proxy = istr.readProxy();";
out << nl << "if(proxy != null)";
out << sb;
out << nl << name << "PrxHelper result = new " << name << "PrxHelper();";
@@ -4951,8 +4951,8 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p)
}
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
string typeS = typeToString(p, TypeModeIn, package);
@@ -5015,7 +5015,7 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void" << nl << "write(" << getAbsolute("Ice.OutputStream", package) << " ostr, "
+ out << nl << "public static void" << nl << "write(" << getUnqualified("Ice.OutputStream", package) << " ostr, "
<< typeS << " v)";
out << sb;
iter = 0;
@@ -5027,7 +5027,7 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p)
{
out << nl << "@SuppressWarnings(\"unchecked\")";
}
- out << nl << "public static " << typeS << nl << "read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << nl << "public static " << typeS << nl << "read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << typeS << " v;";
iter = 0;
@@ -5054,8 +5054,8 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p)
TypePtr value = p->valueType();
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
StringList metaData = p->getMetaData();
string formalType = typeToString(p, TypeModeIn, package, StringList(), true);
@@ -5068,7 +5068,7 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void" << nl << "write(" << getAbsolute("Ice.OutputStream", package) << " ostr, "
+ out << nl << "public static void" << nl << "write(" << getUnqualified("Ice.OutputStream", package) << " ostr, "
<< formalType << " v)";
out << sb;
iter = 0;
@@ -5076,7 +5076,7 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << eb;
out << sp << nl << "public static " << formalType
- << nl << "read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ << nl << "read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << formalType << " v;";
iter = 0;
@@ -5201,35 +5201,35 @@ 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 callbackParamName = getEscapedParamName(op, "cb");
- const string callbackParam = getAbsolute("Ice.Callback", package) + " " + callbackParamName;
+ const string callbackParam = getUnqualified("Ice.Callback", package) + " " + callbackParamName;
const ParamDeclList paramList = op->parameters();
int iter;
//
// Type-unsafe begin methods
//
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << "null"
<< epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << contextParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false"
<< "null" << epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << callbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false"
<< callbackParamName << epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << contextParam << callbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false"
@@ -5247,17 +5247,17 @@ 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());
+ string opClassName = getUnqualified(cl, package, "Callback_", '_' + op->name());
typeSafeCallbackParam = opClassName + " " + getEscapedParamName(op, "cb");
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << typeSafeCallbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false"
<< callbackParamName << epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << contextParam << typeSafeCallbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false"
@@ -5268,14 +5268,14 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
// Async methods that accept Java 8 lambda callbacks.
//
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, false, false, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package) << epar << ';';
out << eb;
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, false, true, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, false, true) << epar
@@ -5283,14 +5283,14 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
out << eb;
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, true, false, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true) << epar << ';';
out << eb;
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, true, true, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true, true) << epar
@@ -5305,7 +5305,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
copy(asyncParams.begin(), asyncParams.end(), back_inserter(params));
out << sp;
- out << nl << "private " << getAbsolute("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
+ out << nl << "private " << getUnqualified("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
writeParamList(out, params);
out << sb;
@@ -5363,7 +5363,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
out << eb;
out << sp;
- out << nl << "public final void _iceCompleted(" << getAbsolute("Ice.AsyncResult", package) << " result)";
+ out << nl << "public final void _iceCompleted(" << getUnqualified("Ice.AsyncResult", package) << " result)";
out << sb;
out << nl << p->name() << "PrxHelper._iceI_" << op->name() << "_completed(this, result);";
out << eb;
@@ -5392,7 +5392,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
"new " + baseClass + "(responseCb, userExceptionCb, exceptionCb, sentCb)");
out.inc();
out << sb;
- out << nl << "public final void _iceCompleted(" << getAbsolute("Ice.AsyncResult", package) << " result)";
+ out << nl << "public final void _iceCompleted(" << getUnqualified("Ice.AsyncResult", package) << " result)";
out << sb;
out << nl << p->name() << "PrxHelper._iceI_" << op->name() << "_completed(this, result);";
out << eb;
@@ -5413,7 +5413,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
params.push_back("IceInternal.CallbackBase cb");
out << sp;
- out << nl << "private " << getAbsolute("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
+ out << nl << "private " << getUnqualified("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
writeParamList(out, params);
out << sb;
if(op->returnsData())
@@ -5431,7 +5431,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
iter = 0;
if(!inArgs.empty())
{
- out << nl << getAbsolute("Ice.OutputStream", package) << " ostr = result.startWriteParams("
+ out << nl << getUnqualified("Ice.OutputStream", package) << " ostr = result.startWriteParams("
<< opFormatTypeToString(op) << ");";
ParamDeclList pl;
for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
@@ -5455,7 +5455,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
out << nl << "result.invoke();";
out << eb;
- out << nl << "catch(" << getAbsolute("Ice.Exception", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.Exception", package) << " ex)";
out << sb;
out << nl << "result.abort(ex);";
out << eb;
@@ -5480,7 +5480,7 @@ Slice::GenCompat::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "Prx");
+ string absolute = getUnqualified(p, "", "", "Prx");
open(absolute, p->file());
@@ -5494,14 +5494,14 @@ Slice::GenCompat::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "public interface " << name << "Prx extends ";
if(bases.empty())
{
- out << getAbsolute("Ice.ObjectPrx", package);
+ out << getUnqualified("Ice.ObjectPrx", package);
}
else
{
out.useCurrentPosAsIndent();
for(ClassList::const_iterator q = bases.begin(); q != bases.end();)
{
- out << getAbsolute(*q, package, "", "Prx");
+ out << getUnqualified(*q, package, "", "Prx");
if(++q != bases.end())
{
out << ',' << nl;
@@ -5595,17 +5595,17 @@ 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 = getAbsolute("Ice.Callback", package) + " " + getEscapedParamName(p, "cb");
+ string callbackParam = getUnqualified("Ice.Callback", package) + " " + getEscapedParamName(p, "cb");
string callbackDoc = "@param cb The asynchronous callback object.";
out << sp;
writeDocCommentAMI(out, p, InParam);
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
<< epar << ';';
out << sp;
writeDocCommentAMI(out, p, InParam, contextDoc);
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
<< contextParam << epar << ';';
out << sp;
@@ -5628,7 +5628,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());
+ string opClassName = getUnqualified(cl, package, "Callback_", '_' + p->name());
typeSafeCallbackParam = opClassName + " " + getEscapedParamName(p, "cb");
out << sp;
@@ -5771,7 +5771,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());
+ string opClassName = getUnqualified(cl, package, "Callback_", '_' + p->name());
typeSafeCallbackParam = opClassName + " " + getEscapedParamName(p, "cb");
out << sp;
@@ -5800,7 +5800,7 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isLocal() && p->isInterface())
{
- string absolute = getAbsolute(p, "", "_", "Disp");
+ string absolute = getUnqualified(p, "", "_", "Disp");
open(absolute, p->file());
@@ -5825,7 +5825,7 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
// Tie class
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "_", "Tie");
+ string absolute = getUnqualified(p, "", "_", "Tie");
string opIntfName = "Operations";
if(p->isLocal())
{
@@ -6100,7 +6100,7 @@ Slice::GenCompat::BaseImplVisitor::writeDecl(Output& out, const string& package,
if(en)
{
EnumeratorList enumerators = en->enumerators();
- out << " = " << getAbsolute(en, package) << '.' << fixKwd(enumerators.front()->name());
+ out << " = " << getUnqualified(en, package) << '.' << fixKwd(enumerators.front()->name());
}
else
{
@@ -6306,7 +6306,7 @@ Slice::GenCompat::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "I");
+ string absolute = getUnqualified(p, "", "", "I");
open(absolute, p->file());
@@ -6362,7 +6362,7 @@ Slice::GenCompat::ImplTieVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "I");
+ string absolute = getUnqualified(p, "", "", "I");
open(absolute, p->file());
@@ -6480,13 +6480,13 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
//
if(p->returnsData() && ((ret && !outParams.empty()) || outParams.size() > 1))
{
- open(getAbsolute(cl, "", "_Callback_", "_" + name), p->file());
+ open(getUnqualified(cl, "", "_Callback_", "_" + name), p->file());
Output& out = output();
writeDocCommentOp(out, p);
out << sp << nl << "public interface " << ("_Callback_" + cl->name()) << '_' << name
- << " extends " << getAbsolute(throws.empty() ? "Ice.TwowayCallback" : "Ice.TwowayCallbackUE", package);
+ << " extends " << getUnqualified(throws.empty() ? "Ice.TwowayCallback" : "Ice.TwowayCallbackUE", package);
out << sb;
out << nl << "public void response" << spar << params << epar << ';';
out << eb;
@@ -6495,7 +6495,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
}
string classNameAsync = "Callback_" + cl->name();
- string absoluteAsync = getAbsolute(cl, "", "Callback_", "_" + name);
+ string absoluteAsync = getUnqualified(cl, "", "Callback_", "_" + name);
open(absoluteAsync, p->file());
@@ -6511,7 +6511,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
out.dec();
out << sb;
- out << sp << nl << "public final void _iceCompleted(" << getAbsolute("Ice.AsyncResult", package)
+ out << sp << nl << "public final void _iceCompleted(" << getUnqualified("Ice.AsyncResult", package)
<< " result)";
out << sb;
out << nl << cl->name() << "PrxHelper._iceI_" << p->name() << "_completed(this, result);";
@@ -6521,7 +6521,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
}
else
{
- out << " extends " << getAbsolute("Ice.OnewayCallback", package);
+ out << " extends " << getUnqualified("Ice.OnewayCallback", package);
out << sb;
out << eb;
}
@@ -6532,10 +6532,10 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
string classNameAMD = "AMD_" + cl->name();
- string absoluteAMD = getAbsolute(cl, "", "AMD_", "_" + name);
+ string absoluteAMD = getUnqualified(cl, "", "AMD_", "_" + name);
string classNameAMDI = "_AMD_" + cl->name();
- string absoluteAMDI = getAbsolute(cl, "", "_AMD_", "_" + name);
+ string absoluteAMDI = getUnqualified(cl, "", "_AMD_", "_" + name);
const bool optionalMapping = useOptionalMapping(p);
vector<string> paramsAMD = getParamsAsyncCB(p, classPkg, true, optionalMapping);
@@ -6547,7 +6547,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
writeDocCommentOp(out, p);
out << sp << nl << "public interface " << classNameAMD << '_' << name;
- out << " extends " << getAbsolute("Ice.AMDCallback", package);
+ out << " extends " << getUnqualified("Ice.AMDCallback", package);
out << sb;
out << sp;
writeDocCommentAsync(out, p, OutParam);
@@ -6592,7 +6592,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
iter = 0;
if(ret || !outParams.empty())
{
- out << nl << getAbsolute("Ice.OutputStream", package) << " ostr_ = this.startWriteParams();";
+ out << nl << getUnqualified("Ice.OutputStream", package) << " ostr_ = this.startWriteParams();";
writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false, "ret", false);
if(p->returnsClasses(false))
{