期刊文献+

Spring中Bean工厂模式的改进 被引量:3

IMPROVEMENT OF BEANFACTORY PATTERN IN SPRING
在线阅读 下载PDF
导出
摘要 主要利用Java泛型编程将泛型机制与设计模式有机地结合并加以优化和实现,提出一种基于Java泛型类型(generictype)的类型转换方案,在工厂设计模式或其他应用中可有效摆脱类型强制转换或向下类型转换的过程中极容易发生错误的情况。并针对Spring中强制类型转换工厂进行改进,在利用工厂获得某个类的实例时不需要硬编码的方式强制转换实例的类型。该改进提高了软件体系结构的可扩展性,为程序设计者提供了方便。最后,通过实际编程验证了该方案的有效性以及在类型转换中的优越性。 In this paper we mainly use Java generic programming to integrate the generic mechanism with design patterns in organic way and realise as well as optimise it.We propose a new class cast scheme which is based on Java generic types,to use the scheme in factory design pattern or other types of applications can effectively get rid of the error situations which are prone to incur in the process of either mandatory class cast or downward class cast.Moreover,we make the improvement in light of the mandatory class cast factory in Spring,when getting a certain instance of class with factory,it does not need the class of mandatory cast instance through hard code manner.The scheme improves the scalability of the software architecture,and provides convenience to programmers.Finally,the actual programming experiment results demonstrate its effectiveness and superiority of the scheme in class cast.
作者 夏龄
出处 《计算机应用与软件》 CSCD 北大核心 2012年第11期165-167,238,共4页 Computer Applications and Software
基金 四川省教育厅科研基金项目(10ZC025)
关键词 泛型 泛型编程 工厂模式 XML Generic Generic programming Factory pattern XML
  • 相关文献

参考文献7

二级参考文献47

  • 1何丽莉,金淳兆,冯铁,张家晨.关注分离问题研究综述[J].计算机科学,2005,32(2):129-132. 被引量:7
  • 2官全龙,姚国祥.基于Struts的应用架构的研究[J].计算机工程与设计,2005,26(12):3225-3227. 被引量:22
  • 3宋波,刘杰,周传生.基于TopLink的J2EE数据持久层的实现[J].微电子学与计算机,2006,23(8):132-135. 被引量:5
  • 4段玉聪,顾毓清.多维关注分离的模型驱动过程框架设计方法[J].软件学报,2006,17(8):1707-1716. 被引量:6
  • 5Bauer A, Leucker M, Schallhart C. Runtime verification for LTL and TLTL. ACM Trans. on Software and Methodology (TOSEM), upcoming. 2010.
  • 6Dwyer MB, Avrunin GS, Corbett JC. Property specification pattems for finite-state verification. In: Proc. of the 2nd Workshop on Formal Methods in Software Practice (FMSP'98). New York: ACM Press, 1998.7-15. [doi: 10.1145/298595.298598].
  • 7Kiczales G, Lamping J, Mendhekar A, Maeda C, Lopes C, Loingtier JM, Irwin J. Aspect-Oriented programming. In: Proc. of the European Conf. on Object-Oriented Programming. LNCS 1241, Springer-Verlag, 1997. 220-242.
  • 8Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold WG. An overview of AspectJ. In: Proc. of the ECOOP 2001. London: Springer-Verlag, 2001. 327-353.
  • 9Kim MZ, Viswanathan M, Kannan S, Lee I, Sokolsky O. Java-MaC: A run-time assurance approach for Java programs. Formal Methods in System Design, 2004,24(2): 129-155. [doi: 10.1023/B:FORM.0000017719.43755.7c].
  • 10Malakuti S, Bockisch C, Aksit M. A rule set to detect interference of runtime enforcement mechanisms. In: Proc. of the 20th Annual Int'l Symp. on Software Reliability Engineering (ISSRE 2009). Mysore: IEEE Computer Society Press. 2009.16-19.

共引文献20

同被引文献26

引证文献3

二级引证文献13

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部