@@ -59,14 +59,13 @@ public enum Separators
5959 /**
6060 * Add separator to a generated StringBuilder
6161 *
62- * @param builder the code generation builder to which information should be added
63- * @param indent the current generated code indentation
64- * @param generatedBuilder the name of the generated StringBuilder to which separator should be added
62+ * @param builder the code generation builder to which information should be added
63+ * @param indent the current generated code indentation
64+ * @param builderName of the generated StringBuilder to which separator should be added
6565 */
66- public void appendToGeneratedBuilder (
67- final StringBuilder builder , final String indent , final String generatedBuilder )
66+ public void appendToGeneratedBuilder (final StringBuilder builder , final String indent , final String builderName )
6867 {
69- append (builder , indent , generatedBuilder + ".append('" + symbol + "');" );
68+ append (builder , indent , builderName + ".append('" + symbol + "');" );
7069 }
7170
7271 public String toString ()
@@ -271,4 +270,50 @@ public static String generateTypeJavadoc(final String indent, final Token typeTo
271270 indent + " * " + description + '\n' +
272271 indent + " */\n " ;
273272 }
273+
274+ /**
275+ * Generate the Javadoc comment header for a bitset choice option decode method.
276+ *
277+ * @param indent level for the comment.
278+ * @param optionToken for the type.
279+ * @return a string representation of the Javadoc comment.
280+ */
281+ public static String generateOptionDecodeJavadoc (final String indent , final Token optionToken )
282+ {
283+ final String description = optionToken .description ();
284+ if (null == description || description .length () == 0 )
285+ {
286+ return "" ;
287+ }
288+
289+ return
290+ indent + "/**\n " +
291+ indent + " * " + description + '\n' +
292+ indent + " *\n " +
293+ indent + " * @return true if " + optionToken .name () + " is set or false if not\n " +
294+ indent + " */\n " ;
295+ }
296+
297+ /**
298+ * Generate the Javadoc comment header for a bitset choice option encode method.
299+ *
300+ * @param indent level for the comment.
301+ * @param optionToken for the type.
302+ * @return a string representation of the Javadoc comment.
303+ */
304+ public static String generateOptionEncodeJavadoc (final String indent , final Token optionToken )
305+ {
306+ final String description = optionToken .description ();
307+ if (null == description || description .length () == 0 )
308+ {
309+ return "" ;
310+ }
311+
312+ return
313+ indent + "/**\n " +
314+ indent + " * " + description + '\n' +
315+ indent + " *\n " +
316+ indent + " * @param value true if " + optionToken .name () + " is set or false if not\n " +
317+ indent + " */\n " ;
318+ }
274319}
0 commit comments