Hi,
Question?
What is the best way to document a method developed for a B4J Library (with Java using Eclipse)?
Why asking?
Example method with javadoc tags for building a B4J Library using Java and Eclipse:
/**
* Convert each word in a string to capital letter
* @param str as the string to convert
* @return string with capital letters or an empty string
* */
public static String toCapital(String str)
the related XML code produced after generating JavaDoc is:
<method>
<name>toCapital</name>
<comment>Convert each word in a string to capital letter
str: as the string to convert
Return type: @return:string with capital letters or an empty string
</comment>
<returntype>java.lang.String</returntype>
<parameter>
<name>str</name>
<type>java.lang.String</type>
</parameter>
</method>
Observation
Seems the JavaDoc parameter for a method are not correcty interpreted:
- Following is added to the comment section
- @param str ... is replaced by str: ...
- @return ... is replaced by Return Type : @return
- The <returntype> shows java.lang.String instead of String
- The parameter also show java.lang.String instead of String
Would have expected:
Convert each word in a string to capital letter
Parameters:
str as the string to convert
Returns:
string with capital letters or an empty string