summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2017-06-15 10:33:21 -0400
committerBernard Normier <bernard@zeroc.com>2017-06-15 10:33:21 -0400
commitcbdfeeb7ba792e1eefcd06a9d1beb178de3ec444 (patch)
tree4558a177ae28023da195e06aab6eb9a39a6c36f3 /cpp
parentUpdate Java to use Apache Commons Compress Bzip2 implementation (diff)
downloadice-cbdfeeb7ba792e1eefcd06a9d1beb178de3ec444.tar.bz2
ice-cbdfeeb7ba792e1eefcd06a9d1beb178de3ec444.tar.xz
ice-cbdfeeb7ba792e1eefcd06a9d1beb178de3ec444.zip
Fixed most javadoc warnings
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/slice2java/GenCompat.cpp47
1 files changed, 44 insertions, 3 deletions
diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp
index f23183de94c..bf147cd9e8c 100644
--- a/cpp/src/slice2java/GenCompat.cpp
+++ b/cpp/src/slice2java/GenCompat.cpp
@@ -2104,6 +2104,39 @@ Slice::JavaCompatVisitor::writeDocCommentAsync(Output& out, const OperationPtr&
if(paramType == InParam)
{
+ //
+ // Print @throws tags
+ //
+ const string throwsTag = "@throws";
+ bool found = false;
+ for(StringList::const_iterator i = lines.begin(); i != lines.end(); ++i)
+ {
+ if(found && i->find("@") == 0)
+ {
+ found = false; // reset
+ }
+
+ if(!found)
+ {
+ if(i->find(throwsTag) != string::npos)
+ {
+ found = true;
+ }
+ }
+
+ if(found)
+ {
+ if((*i).empty())
+ {
+ out << nl << " *";
+ }
+ else
+ {
+ out << nl << " * " << *i;
+ }
+ }
+ }
+
if(!deprecateReason.empty())
{
out << nl << " * @deprecated " << deprecateReason;
@@ -2200,6 +2233,11 @@ Slice::JavaCompatVisitor::writeDocCommentAMI(Output& out, const OperationPtr& p,
bool found = false;
for(StringList::const_iterator i = lines.begin(); i != lines.end(); ++i)
{
+ if(found && i->find("@") == 0)
+ {
+ found = false; // reset
+ }
+
if(!found)
{
if(i->find(returnTag) != string::npos || i->find(throwsTag) != string::npos ||
@@ -2774,7 +2812,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << "Ice.AsyncResult begin_" << opname << spar << inParams << epar << ';';
out << sp;
- writeDocCommentAMI(out, op, InParam);
+ writeDocCommentAMI(out, op, InParam, "@param " + getEscapedParamName(op, "cb") + " A generic callback.");
out << nl;
if(!p->isInterface())
{
@@ -2784,7 +2822,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
<< epar << ';';
out << sp;
- writeDocCommentAMI(out, op, InParam);
+ writeDocCommentAMI(out, op, InParam, "@param " + getEscapedParamName(op, "cb") + " A typed callback.");
out << nl;
if(!p->isInterface())
{
@@ -2794,7 +2832,10 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << "Ice.AsyncResult begin_" << opname << spar << inParams << cb << epar << ';';
out << sp;
- writeDocCommentAMI(out, op, InParam);
+ writeDocCommentAMI(out, op, InParam,
+ "@param " + getEscapedParamName(op, "responseCb") + " The response callback.",
+ "@param " + getEscapedParamName(op, "exceptionCb") + " The exception callback.",
+ "@param " + getEscapedParamName(op, "sentCb") + " The sent callback.");
out << nl;
if(!p->isInterface())
{