检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:杜学功 DU Xuegong(School of Information Engineering,Lanzhou University of Finance and Economics,Lanzhou 730020,China)
机构地区:[1]兰州财经大学信息工程学院,甘肃兰州730020
出 处:《兰州工业学院学报》2023年第1期90-94,共5页Journal of Lanzhou Institute of Technology
基 金:甘肃省哲学社会科学规划项目(2022YB077)。
摘 要:装饰设计模式是面向对象编程的主要设计模式,剖析了装饰设计模式的思想,采用案例设计、测试运行的方法对其在Java和JavaWeb中的重点应用进行分析,实现了处理字符集编码的请求包装器和进行文本替换的响应包装器。结果表明:包装类只有拥有被包装类对象并保持相同的接口,才能对其进行装饰设计,重用并增强其功能。The decoration design pattern is the main one of object-oriented programming.In this paper,the idea of the decoration design pattern is analyzed,the method of case design and test run is used to analyze its key applications in Java and JavaWeb.The request wrapper for handling character set encoding and a response wrapper for test substitution are realized.The results show that the wrapper class can be decorated,reused and enhanced only when it owns the object of the wrapper class and maintain the same interface.
关 键 词:装饰设计模式 接口 多态性 JavaEE-API SERVLET过滤器
分 类 号:TP312[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.229