Improving API documentation for Java-like languages

Gilles Dubochet, Donna Malayeri
{"title":"Improving API documentation for Java-like languages","authors":"Gilles Dubochet, Donna Malayeri","doi":"10.1145/1937117.1937120","DOIUrl":null,"url":null,"abstract":"The Javadoc paradigm for displaying API documentation to users is quite popular, with similar variants existing for many mainstream languages. However, two user interface design properties of Javadoc may reduce its utility when displaying documentation for APIs that make use of inheritance and parametric polymorphism. First, Javadoc does not show a flattened view of all members of a class or interface, but rather only those defined directly in the type. Second, and as a consequence, any methods whose types contain type parameters of a superclass will always be shown in the context of the superclass. That is, if the method C.m returns type T, subclasses of C will always see this parent signature, even if they instantiate T to a concrete type such as Integer.\n We show that this situation arises often in some libraries, and present the results of a study that measures the usability consequences of these two Javadoc design decisions. Our results show that a user interface that shows instantiated type parameters for members is preferred over one that presents type parameters in the Javadoc style.","PeriodicalId":217446,"journal":{"name":"Workshop on Evaluation and Usability of Programming Languages and Tools","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-10-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop on Evaluation and Usability of Programming Languages and Tools","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1937117.1937120","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

The Javadoc paradigm for displaying API documentation to users is quite popular, with similar variants existing for many mainstream languages. However, two user interface design properties of Javadoc may reduce its utility when displaying documentation for APIs that make use of inheritance and parametric polymorphism. First, Javadoc does not show a flattened view of all members of a class or interface, but rather only those defined directly in the type. Second, and as a consequence, any methods whose types contain type parameters of a superclass will always be shown in the context of the superclass. That is, if the method C.m returns type T, subclasses of C will always see this parent signature, even if they instantiate T to a concrete type such as Integer. We show that this situation arises often in some libraries, and present the results of a study that measures the usability consequences of these two Javadoc design decisions. Our results show that a user interface that shows instantiated type parameters for members is preferred over one that presents type parameters in the Javadoc style.
改进类java语言的API文档
用于向用户显示API文档的Javadoc范例非常流行,许多主流语言都有类似的变体。然而,Javadoc的两个用户界面设计属性在显示使用继承和参数多态性的api文档时可能会降低它的实用性。首先,Javadoc不显示类或接口的所有成员的扁平视图,而只显示直接在类型中定义的成员。其次,因此,任何类型包含超类类型参数的方法都将始终显示在该超类的上下文中。也就是说,如果方法C.m返回类型T,则C的子类将始终看到此父签名,即使它们将T实例化为具体类型(如Integer)。我们展示了这种情况在一些库中经常出现,并给出了一项研究的结果,该研究测量了这两种Javadoc设计决策的可用性后果。我们的结果表明,显示成员实例化类型参数的用户界面比以Javadoc风格显示类型参数的用户界面更可取。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信