summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-12-08 11:33:42 -0500
committerJoe George <joe@zeroc.com>2015-12-08 16:09:24 -0500
commit6a43686ce26de5d2d5edf4a485ecff3a242c26b6 (patch)
treed31e4f16dc9ed6e28056a7224e045a4638955f5e /cpp/src/slice2java/Gen.cpp
parentC++11 mapping IceDiscovery plug-in (diff)
downloadice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.tar.bz2
ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.tar.xz
ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.zip
ICE-6908 - Add ValueFactory
ValueFactory is a replacement for ObjectFactory (which is still available if needed). It is an interface with only one operation and can has the "delegate" metadata.
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index e5876b07211..d0397e9cb41 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -3277,20 +3277,17 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isInterface() && p->allOperations().size() == 0 && !p->isLocal())
{
out << sp;
- out << nl << "private static class __F implements Ice.ObjectFactory";
+ out << nl << "private static class __F implements Ice.ValueFactory";
out << sb;
out << nl << "public Ice.Object create(String type)";
out << sb;
out << nl << "assert(type.equals(ice_staticId()));";
out << nl << "return new " << fixKwd(name) << "();";
out << eb;
- out << sp << nl << "public void destroy()";
- out << sb;
- out << eb;
out << eb;
- out << nl << "private static Ice.ObjectFactory _factory = new __F();";
+ out << nl << "private static Ice.ValueFactory _factory = new __F();";
out << sp;
- out << nl << "public static Ice.ObjectFactory" << nl << "ice_factory()";
+ out << nl << "public static Ice.ValueFactory" << nl << "ice_factory()";
out << sb;
out << nl << "return _factory;";
out << eb;