public void convertCallbacks(
      List<FunctionSignature> functionSignatures,
      Signatures signatures,
      DeclarationsHolder out,
      Identifier libraryClassName) {
    if (functionSignatures != null) {
      for (FunctionSignature functionSignature : functionSignatures) {
        if (functionSignature.findParentOfType(Struct.class) != null) continue;

        Arg a = functionSignature.findParentOfType(Arg.class);
        if (a != null && a.getParentElement() == null)
          continue; // TODO understand why we end up having an orphan Arg here !!!!

        convertCallback(functionSignature, signatures, out, libraryClassName);
      }
    }
  }
 protected void collectParamComments(Function f) {
   for (Arg arg : f.getArgs()) {
     arg.moveAllCommentsBefore();
     TypeRef argType = arg.getValueType();
     if (argType != null) {
       if (!result.config.noComments) {
         argType.moveAllCommentsBefore();
         arg.addToCommentBefore(argType.getCommentBefore());
       }
       argType.stripDetails();
     }
     if (arg.getCommentBefore() != null) {
       if (!result.config.noComments)
         f.addToCommentBefore(
             "@param " + arg.getName() + " " + Element.cleanComment(arg.getCommentBefore()));
       arg.stripDetails();
     }
   }
 }