使用反射和动态调用的Java混合编程

PPPJ/IRE Pub Date : 2002-06-13 DOI:10.1145/638476.638483
T. Brown, I. Spence, P. Kilpatrick
{"title":"使用反射和动态调用的Java混合编程","authors":"T. Brown, I. Spence, P. Kilpatrick","doi":"10.1145/638476.638483","DOIUrl":null,"url":null,"abstract":"The concept of mixin programming has emerged as an important implementation technique in the context ol software reuse and software productivity. In mixin based programming classes are defined which support particular roles or capabilities, which may require to be attached to a number of other classes. Mixin classes can be composed dynamically so that composite objects with differing combinations of roles and capabilities may be created without redundancy. Implementing the mixin concept in C++ is straightforward, using the parameterized inheritance capabilities provided by C++ templates. In standard Java it is not possible to use this approach because Java does not currently provide templates. But the Java language has other powerfull facilities, of which one is reflection. In this paper we outline an approach to mixin programming in Java, which is subject to ongoing development and which is based on exploiting Java's reflection capabilities.","PeriodicalId":120999,"journal":{"name":"PPPJ/IRE","volume":"124 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2002-06-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Mixin programming in Java with reflection and dynamic invocation\",\"authors\":\"T. Brown, I. Spence, P. Kilpatrick\",\"doi\":\"10.1145/638476.638483\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The concept of mixin programming has emerged as an important implementation technique in the context ol software reuse and software productivity. In mixin based programming classes are defined which support particular roles or capabilities, which may require to be attached to a number of other classes. Mixin classes can be composed dynamically so that composite objects with differing combinations of roles and capabilities may be created without redundancy. Implementing the mixin concept in C++ is straightforward, using the parameterized inheritance capabilities provided by C++ templates. In standard Java it is not possible to use this approach because Java does not currently provide templates. But the Java language has other powerfull facilities, of which one is reflection. In this paper we outline an approach to mixin programming in Java, which is subject to ongoing development and which is based on exploiting Java's reflection capabilities.\",\"PeriodicalId\":120999,\"journal\":{\"name\":\"PPPJ/IRE\",\"volume\":\"124 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2002-06-13\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"PPPJ/IRE\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/638476.638483\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"PPPJ/IRE","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/638476.638483","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

摘要

混合编程作为一种重要的实现技术,在软件复用和软件生产力方面已经崭露头角。在mixin中,基于编程的类被定义为支持特定的角色或功能,这些角色或功能可能需要附加到许多其他类。Mixin类可以动态组合,这样就可以创建具有不同角色和功能组合的复合对象,而不会产生冗余。使用c++模板提供的参数化继承功能,在c++中实现mixin概念很简单。在标准Java中不可能使用这种方法,因为Java目前不提供模板。但是Java语言还有其他强大的功能,其中之一就是反射。在本文中,我们概述了一种在Java中进行mixin编程的方法,该方法基于利用Java的反射功能,并受到正在进行的开发的影响。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Mixin programming in Java with reflection and dynamic invocation
The concept of mixin programming has emerged as an important implementation technique in the context ol software reuse and software productivity. In mixin based programming classes are defined which support particular roles or capabilities, which may require to be attached to a number of other classes. Mixin classes can be composed dynamically so that composite objects with differing combinations of roles and capabilities may be created without redundancy. Implementing the mixin concept in C++ is straightforward, using the parameterized inheritance capabilities provided by C++ templates. In standard Java it is not possible to use this approach because Java does not currently provide templates. But the Java language has other powerfull facilities, of which one is reflection. In this paper we outline an approach to mixin programming in Java, which is subject to ongoing development and which is based on exploiting Java's reflection capabilities.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信