Android Studio generate JavaDoc for AIDL

Viewed 352

Given that AIDL contain interface definitions, it is important to incorporate them into our javadoc. However, Android Studio completely refuses to see Javadoc comments added either to aidl files or those to be found in the java files generated from them.

This is what I have in my .aidl test file:

/**
 * Displays a Toast Message containing the specified String.
 * To be used for testing purpose only.
 *
 * @param message the Message to be displayed
 * @return        whether or not the Message could be shown
 */
boolean testMessage(String message);

and this is in the generated .java file:

    /**
     * Displays a Toast Message containing the specified String.
     * To be used for testing purpose only.
     *
     * @param message the Message to be displayed
     * @return        whether or not the Message could be shown
     */
@Override public boolean testMessage(java.lang.String message) throws android.os.RemoteException
{
  return false;
}

I can generate JavaDoc for the implementation file (e.g. AidlImpl.java in case of IAidl.aidl), but that would yield wrong references in the JavaDoc as the end user would have to use IAidl and not AidlImpl.

How's that supposed to work?

@edit: I ended up writing a wrapper class for the library which can contain javadoc comments the usual way. Not exactly the most elegant solution, but reasonably straightforward. Thanks for your attention!

0 Answers
Related