Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2014-10-28 09:44:32 +0000
committerSebastian Struckmann2014-10-28 09:52:31 +0000
commit60065e80a35c4ecf7e63ab39ce25238ff9244afc (patch)
tree2b458b498e2488f8a1de6f897f5e7a7fc3d84de6 /org.eclipse.jubula.toolkit.api.gen
parentfa2e36d2b098786f1a3239e7fe21ec3fbbab3852 (diff)
downloadorg.eclipse.jubula.core-60065e80a35c4ecf7e63ab39ce25238ff9244afc.tar.gz
org.eclipse.jubula.core-60065e80a35c4ecf7e63ab39ce25238ff9244afc.tar.xz
org.eclipse.jubula.core-60065e80a35c4ecf7e63ab39ce25238ff9244afc.zip
Sprint task - Java API - Added small javadoc to methods of generated classes
Diffstat (limited to 'org.eclipse.jubula.toolkit.api.gen')
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
index edee3a73c..0b55c99a3 100644
--- a/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
@@ -154,7 +154,11 @@ public <%if (genInterface) {%>interface<%} else {%>class<%}%> <%=className%>
}
String methodName = nameLoader.translateFromCompSystem(action.getName());
List<Param> params = action.getParams();
+ if (!params.isEmpty()) {
%>
+ /**
+ * @throws IllegalArgumentException Throws an IllegalArgumentException if one of the parameters is null.
+ */<%}%>
<%if (action.isDeprecated()) {%>@Deprecated<%}%>
@NonNull public CAP <%=methodName%>(
<%
@@ -171,7 +175,7 @@ public <%if (genInterface) {%>interface<%} else {%>class<%}%> <%=className%>
%>
@NonNull <%=paramType%> <%=paramName%><%if(paramIterator.hasNext()){%>,<%}%>
<%}%>
- ) throws IllegalArgumentException<%if (genInterface) {%>;<%} else {%> {
+ ) <%if (!params.isEmpty()) {%>throws IllegalArgumentException<%} if (genInterface) {%>;<%} else {%> {
MessageCap messageCap = new MessageCap();
messageCap.setMethod("<%=action.getMethod()%>"); //$NON-NLS-1$
messageCap.sethasDefaultMapping(<%=hasDefaultMapping%>);

Back to the top