私有类数据模式(Private class data pattern)
2010-04-29 08:03
253 查看
The private class data design pattern seeks to reduce exposure of attributes by limiting their visibility. It reduces the number of class attributes by encapsulating them in single Data object. It allows the class designer to remove write privilege of attributes that are intended to be set only during construction, even from methods of the target class
这种私有的数据类程序设计模式的目的,通过控制一些属性的可见性,来减少暴露在外的属性的数量。由于把这些类的属性包装到一个数据对象中,可见的类的属性就减少了。类的属性的赋值就只能在实例化时完成,目标类的方法也不能对这些属性的值进行操作。
这种私有的数据类程序设计模式的目的,通过控制一些属性的可见性,来减少暴露在外的属性的数量。由于把这些类的属性包装到一个数据对象中,可见的类的属性就减少了。类的属性的赋值就只能在实例化时完成,目标类的方法也不能对这些属性的值进行操作。
相关文章推荐
- 设计模式之美:Private Class Data(私有类数据)
- 通过miscdevice获得驱动私有数据结构体时file->private_data为空的解决方法
- 【CDP-云设计模式】第5章,3.私有分配模式(Private Distribution Pattern)
- 架构模式数据源模式之:表数据入口(Table Data Gateway)、行数据入口(Row Data Gateway)、活动记录(Active Record)
- 重新组织数据之十二 :Replace Record with Data Class(以数据类取代记录)
- PCI9054 突发模式数据传输 (burst mode data transfer )
- jqGrid单元格/行编辑模式下getRowData如何获取数据行
- Java反射操作私有成员变量 Class can not access a member with modifiers "private"
- PCI9054 突发模式数据传输 (burst mode data transfer )
- 多线程编程之私有数据(Thread-Specific-Data,或TSD)
- 架构模式数据源模式之:数据映射器(Data Mapper)
- data/data/目录下的私有数据
- android关于data/data/目录下,各应用之间的私有数据读写
- Data URI scheme - 数据的uri模式
- 数据访问模式:数据并发控制(Data Concurrency Control)
- Data URI scheme - 数据的uri模式
- PCI9054 突发模式数据传输 (burst mode data transfer )
- 单例模式和静态类的区别(Difference between static class and singleton pattern)
- 递归、闭包、私有变量、特权方法、单例、模块模式(module pattern)
- 根据CI模式弄的一个python访问数据的class