summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2017-02-13 19:06:23 -0500
committerBernard Normier <bernard@zeroc.com>2017-02-13 19:06:23 -0500
commit3631ed4ffe08242a1c626976541d85e18b56c05f (patch)
tree82911b4e68f8bf6e5bc7897ae1453acf654c4d7a /cpp/src/slice2java/Gen.cpp
parentICE-7506 - Update copyright to 2017 (diff)
downloadice-3631ed4ffe08242a1c626976541d85e18b56c05f.tar.bz2
ice-3631ed4ffe08242a1c626976541d85e18b56c05f.tar.xz
ice-3631ed4ffe08242a1c626976541d85e18b56c05f.zip
Replaced several functional classes by java.util.function classes
Replaced varous new Runnable() by lambdas Generate @FunctionalInterface Java interfaces for "delegate" Slice interfaces
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index ce104682cd1..16d63924f8d 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -2425,6 +2425,10 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
if(p->isInterface())
{
+ if(p->isDelegate())
+ {
+ out << nl << "@FunctionalInterface";
+ }
out << nl << "public interface " << fixKwd(name);
ClassList::const_iterator q = bases.begin();
StringList::const_iterator r = implements.begin();