Interfaces with default implementations in Java

PPPJ/IRE Pub Date : 2002-06-13 DOI:10.1145/638476.638484
Markus Mohnen
{"title":"Interfaces with default implementations in Java","authors":"Markus Mohnen","doi":"10.1145/638476.638484","DOIUrl":null,"url":null,"abstract":"With the interface construct, Java features a concept with high potential for producing reusable code: Java's interfaces allow the definition of class properties independently of class inheritance. We propose an extension of Java for providing default implementations in interfaces. Default implementations are useful since they reduce the effort required to implement an interface. They are especially interesting if there is a canonical way to implement methods of the interface in terms of some other methods. In these cases, an implementation can be obtained by implementing the base methods and use the default implementations of the other methods.","PeriodicalId":120999,"journal":{"name":"PPPJ/IRE","volume":"11 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2002-06-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"41","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"PPPJ/IRE","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/638476.638484","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 41

Abstract

With the interface construct, Java features a concept with high potential for producing reusable code: Java's interfaces allow the definition of class properties independently of class inheritance. We propose an extension of Java for providing default implementations in interfaces. Default implementations are useful since they reduce the effort required to implement an interface. They are especially interesting if there is a canonical way to implement methods of the interface in terms of some other methods. In these cases, an implementation can be obtained by implementing the base methods and use the default implementations of the other methods.
在Java中具有默认实现的接口
通过接口构造,Java提供了一个非常有可能产生可重用代码的概念:Java的接口允许独立于类继承定义类属性。我们建议对Java进行扩展,以便在接口中提供默认实现。默认实现很有用,因为它们减少了实现接口所需的工作量。如果有一种规范的方法来实现接口的一些其他方法,它们就会特别有趣。在这些情况下,可以通过实现基本方法并使用其他方法的默认实现来获得实现。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:481959085
Book学术官方微信