Java设计模式---装饰模式

时间:2022-11-07 04:43:49

装饰模式又名包装(Wrapper)模式。装饰模式以对客户端透明的方式扩展对象的功能,是继承关系的一个替代方案。

装饰模式的结构

  装饰模式以对客户透明的方式动态地给一个对象附加上一些责任。换言之,客户端并不会觉得对象在装饰前和装饰后有什么不同。装饰模式可以在不使用创造更多子类的情况下,将对象的功能加以扩展。

  装饰模式的类图如下:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnQAAAFzCAIAAAA45gO9AAAgAElEQVR4nO2doZOkyPO3W03EuZEn13TEypEjECvP4k5OBObkVyDOjSLuHyDi5AjEyV+gTiLPEHFyA7WOlScQI3lF7uZbW9AMPXRDFv08YqKbqYYkK8kPVRRVhx4AAAAuymFrAwAAAPYG4goAAHBhEFcAAIALg7gCAABcGMQVAADgwiCuAAAAFwZxBQAAuDCIKwAAwIVBXAEAAC4M4goAAHBhEFcAAIALg7gCAABcGMQVAADgwiCuAAAAFwZxBQAAuDCIKwAAwIVBXAEAAC4M4goAAHBhEFcAAIALg7gCAABcGMQVAADgwiCuAAAAFwZxBQAAuDCIKwAAwIVBXAEAAC4M4goAAHBhEFcAAIALg7gCAABcGFvi+vDwcAAAuDEeHh62zr5wYWyJ6+Fgyx4AgBUg9e0PWzVKhAHADULq2x+2apQIA4AbhNS3P2zVKBEGADcIqW9/2KpRIuzGKcuyaRpvY13XZVm6ZaIoWseePM/LssyybGjVOyjLsq7rORvh1iD17Q9bNUqE3TKjMuMpq5Dn+ZwdLlTEoijk0GVZzjzim6CvMAqpb3/YqlEi7GaZr6zzSdN0iUlZll1D89BXGELq2x+2apQIu03mK2tVVWmaxnHsbkmSpCzLNE1VTZumyfP8eDyWZVmWZdd1Wj7P8zRNtSUqJWWHRVHEcdy2bdd1ZVkmSSLdwtoCbpomyzL35+4+syzzTko2DhvQ6Ct4kPr2h60aJcJukLIsq6ryNrZte6ontq5r75nr8XgUWfL6b10NFtI0lZJd17n/jaJIfqgF+rGWq/6krmuV0jRN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XCXuu9EpfvcoK0qMTCyx0/hCz4ioQqwshVq+BFTtgTa4Xf9I4uMYDmyu9QX9V7KwgvRDj4vo+iFUXYvXiWLED1sRO/EEQ7FJcYZfYCRgrdsCa2Ik/CALEFULBTsBYsQPWxE78QRAgrhAKdgLGih2wJnbiD4IAcYVQsBMwVuyANbm/vz8AzOb+/p5YhSDYMFY9EFcAAIALg7gCAABcGMQVAADgwiCuAAAAFwZxBQAAuDCIKwAAwIVBXAEAAC4M4goAAHBhEFcAAIALg7gCAABcGMQVAADgwiCuAAAAFwZxBQAAuDCIKwAAwIVBXAEAAC4M4goAAHBhEFcAAIALg7gCAABcGMQVAADgwiCuAAAAFwZxBQAAuDCIKwAAwIVBXAEAAC4M4goAAHBhEFcAAIALg7gCAABcmP8HDeRDlKf1KVUAAAAASUVORK5CYII=" alt="" />

  在装饰模式中的角色有:

  ●  抽象构件(Component)角色:给出一个抽象接口,以规范准备接收附加责任的对象。

  ●  具体构件(ConcreteComponent)角色:定义一个将要接收附加责任的类。

  ●  装饰(Decorator)角色:持有一个构件(Component)对象的实例,并定义一个与抽象构件接口一致的接口。

  ●  具体装饰(ConcreteDecorator)角色:负责给构件对象“贴上”附加的责任。

源代码

  抽象构件角色

public interface Component {

    public void sampleOperation();

}

  具体构件角色

public class ConcreteComponent implements Component {

    @Override
public void sampleOperation() {
// 写相关的业务代码
} }

  装饰角色

public class Decorator implements Component{
private Component component; public Decorator(Component component){
this.component = component;
} @Override
public void sampleOperation() {
// 委派给构件
component.sampleOperation();
} }

  具体装饰角色

public class ConcreteDecoratorA extends Decorator {

    public ConcreteDecoratorA(Component component) {
super(component);
} @Override
public void sampleOperation() {
     super.sampleOperation();
// 写相关的业务代码
}
}
public class ConcreteDecoratorB extends Decorator {

    public ConcreteDecoratorB(Component component) {
super(component);
} @Override
public void sampleOperation() {
     super.sampleOperation();
// 写相关的业务代码
}
}

  

装饰模式的简化

  大多数情况下,装饰模式的实现都要比上面给出的示意性例子要简单。

  如果只有一个ConcreteComponent类,那么可以考虑去掉抽象的Component类(接口),把Decorator作为一个ConcreteComponent子类。如下图所示:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtQAAAF0CAIAAACMuznUAAAgAElEQVR4nO3dP6jkWHbA4efkYcMGHdiw+A+0sQsWbMzDGDyBgk7WTGDDyoknbBCGxYkHo2AcdSQ2nERmA2M6ULCbDQrMhAocbCJoNhoUdaYOO1DQoRyc7TNnrq709Pq9kq6ufl/Q1FOrVLeqjs49urol3YwAAAAbutm7AQAA4FwoPgAAwKYoPgAAwKYoPgAAwKYoPhCnu7u7GyBgd3d3e+8lwG4oPhCnmxtiG0EjRHFmRD/iRGZH4AhRnBnRjziR2RE4QhRnRvQjTmR2BI4QxZkR/YgTmR2BI0RxZkQ/4kRmR+AIUZwZ0Y84HSKzd13Xdd3erVjlQE09ikOEKHAlRD/iFH5mT9M0z/OiKC6XS1mWezdnyYGaeiDhhyhwPUQ/4hR4Zk/TVHvxpmmyLNu+DU3TtG1772ohNHW9lW8qBIGHKHBVRD/iFHJm77rucrnYJXVdL6w/DMP6jfd9v3LNLMvu7acf2lSv9e1/0Dv1WvOmAhFyiALXRvQjTiFn9qIokiTx/lee50mSpGlaFMU4jl3XJUmSZVmaprLcbiRNUzkhIktknSRJyrKUB1KI1HWdfiRrVlWVpunlcpFtVlUly7uu0zWlC19oqq4p5UhVVZfLRTabZZlseaH9zjvV9uvKWkVN259l2eVykU/gcrloA7xvKlghhyhwbUQ/4hRyZp/r0WVehTzOsky6T1lZhgSSJNGaQHviy+Wix/oyLUOemKZp3/d93+trlWVpu3/d2nRJ27Yy4DHX1CRJmqbRx1IoXC6Xvu+LopB6aLqFLMvkrI33ncqLSgN0hbn269us69q2cPqmghVyiALXRvQjTiFn9rke3ZYRTdPIOkVRaD+dJIk8TpJEj+xtXzvdclEUciaibVsZnND/cvrptm1liZDGeJuqpYnI89ypNqSRzp/ypmSh951KA5w3Mtd+feA0huIDOASiH3EKObOXZelMpJD+0i60Yw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V93KNOWJJktgXetDIB8UHjmW5+NAMIMdO48yOv6b4WH/wrbxPt3uW3LB+nO8yp8sXOlr9017r4pEjH942eKevPZJMkbHz59aPfCxk3RAcJWuFUnw4bETmee4UHxLE9tB/ujPbmRx2SpSzb8imZOdp21ZfVEOqMNORtAH2IENbIjO2ZOG0+LCBLp2unX4l/+VM8FyY86Hvbnk3mI6FrN+H7bDEsizLbPHhnOW1+7Dz4WuCHn94tjscR9mNsZnlkNB41p3Uu+PPFR+609077cDOi9RRAT1q6vveTjSZnhKVKaWy0O53C8WHzbp25WEYnEMpu497s8Fy8WEnz40PvM5YURQrqwG5eodd4k2wYlp8SJvl5wKhXWfsKFkr0OJDrkhRlmVVVdpJS1BWVSXTUeu6lvmqXddJ/61Tl2VAQtbXp8ssKpl/Ks+V5X3fy0K7D/R9Lw2wfWeaptoG21opou1vPWQs1L6KXU1ecboFrQzkt/Kysm2AzhLX1fQNSsOcyaQ2B8lZ27kPfEprvnu1beusKdO+nE/Pfvi6UJpd17Vk5PXN28ZRdmNsZjkkJLydA57pjl/Xtc1XevghvZrkPX26zSd2mFaygXPEImvap8s6ks3sfqqpTBbqJFPnVaZZV/9L2u/82mW6j0+zgbR8GIZhGJw3K+ws1AfN9nAKl2XTfOgk2HE+FWuXUVUVxcenCbT4eKT1P816kABH2O6lQyzX+ECid5TdGJu5akhcI8OEeULzXlqlHbHx+zpK1oqz+JAC9mlvZeKMo+AMjrIbYzPXC4npQMLjydhwgEfnuJ6jZK04iw/gSRCicBASCNxRQpTiA5hFiMJBSCBwRwlRig9gFiEKByGBwB0lRCk+gFmEKByEBAJ3lBDds5XPnj27AQL27NmzHXcQBIishcAdJWsdo0QCAADRoPgAAACbovgAAACbovgAAACbovgAAACbovgAAACbovgAAACbovgAAACbovgAAACbovgAAACb+n+brN8BB4TEfgAAAABJRU5ErkJggg==" alt="" />

  如果只有一个ConcreteDecorator类,那么就没有必要建立一个单独的Decorator类,而可以把Decorator和ConcreteDecorator的责任合并成一个类。甚至在只有两个ConcreteDecorator类的情况下,都可以这样做。如下图所示:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoEAAADdCAIAAABL4j9KAAAgAElEQVR4nO2dr4/kuNaGC7XuZQMXNok0sOGAgIZLwxa2FLLwgoBlg6L9ByItbBCw8CpoYeASSwtHQc0ycEBAw3zg/froXNtJJV2Vip1+H1Tlcpzj1LFf/4p9GgkhhBCyB6e9DSCEEEI+KNRgQgghZB+owYQQQsg+UIMJIYSQfaAGE0IIIftADSaEEEL2gRpMCCGE7AM1mBBCCNkHajAhhBCyD9RgQgghZB+owYQQQsg+UIMJIYSQfaAGE0IIIftADSaEEEL2gRpMCCGE7MM1Nfjh4eFECCHkWDw8PFxRKYjmmhp8OrFXTQghR4N1+3ZQgwkhhMzBun07qMGEEELmYN2+HdRgQgghc7Bu3w5qMImYqqrOBqZp6o12dbquq6qqaZqiKK6S4JLcEXIDWLdvBzWYxMpCiWqapuu6JQm2bXuJPVmWWR8uhzJMQoB1+3ZQg0mUXF2chmEoy/ICi64pvRrKMNkd1u3bQQ0m8bFQloZhqOs6TVNjjIQURdG2bVVVeZ43TYPwpmmyLEOI7g13XVeWZVEUVkxjjDGmKArIdtu2TdOkado0jcSESUVR6Mu9aerIyxWXMkxuBuv27aAGk8jwzrbOdGG1BiOmpKB7rsYYK5G+7/M8l6tEm8uyLMvSGKMjjE4/GHPD1k9938vnNE1lkFzSadvWm5flgYRcHdbt20ENJpFR13Vd11YgeqXe+K4Gy9d5DdYxjTFaj73i5x2L7roOXWR8RS9cfvLeWiILRVHoLMwEErIFrNu3gxpM4mOVDF+iwejLAhn71SloLA02xmRZBsXVfV/3Wgi83MgygwJMdod1+3ZQg0mULJfhSzRYzw0Pw+CmoLE0OE1TuUR+0v3g8a0rbJktV40UYBIGrNu3gxpMYmWhDC/UYJnclV8xdwtFxCIsNwWNpcFZlvV9Lzb0b0g0nSbWeY1v68gQSAEmgcC6fTuowSRirKXFoOs6COcwDBjaldXOeAEJIof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jTkqWOO4RYe6Y+czxhe9DFHfqlOKZh6/7vtRgsgQ+WUKuxpI1WVVVpWkKLdGjymf7wcs12K36q6qyTqp2u7zeG2ncA4ClG315P3iJBruHZ89YewlossgQNzWYGrwdfLKEXA1dVQ3DoNcf6ZVHUjt7D7FfosHzY9E6pjuuKwdyT6Upx/qObwvB3MjjWw9e50iukgxaJxIuHIue0mBvyPJXhK3FXzNgxEK+Lh+LxqHL+KyfT+xQg7eDT5aQqzFTVWFNEzrHslGGrN+p6zrPc4TneY6DclG54+s4jkmSIFze9B3fFkBh9FgkEKkhWZlv1gu1xKo0TRGIVWDaVGwxgVtjTRYUVDcspL9YVVWe57qrLQZICEa2rfOPobh1Xcu1kg6WjFljCVVV6WbBqi1H0jRduJmJllK5r6zJ0vbLw5eYGNuAbMsUe+xQg7eDT5aQq7GkqnIr5YXVNLpfy+t0b0wrcCbNhTeaedtnYQprVaooCrQDpIlwM44hqO+AGrwdfLKEXI3tqip0Qy95vdUFHc0b7Jl1dfTLzeQGUIO3g0+WkKvBqoocEjr2dvDJEnI1WFWRQ0LH3g4+WUKuBqsqckjo2NvBJ0vI1WBVRQ4JHXs7+GQJuRo8u5MckriOEI0LajAhhBCyD9RgQgghZB+owYQQQsg+UIMJIYSQfaAGE0IIIftADSaEEEL2gRpMCCGE7AM1mBBCCNkHajAhhBCyD9RgQgghZB+owYQQQsg+UIMJIYSQfaAGE0IIIftADSaEEEL24f8A7rBIIfGd+QAAAAAASUVORK5CYII=" alt="" />

透明性的要求

  装饰模式对客户端的透明性要求程序不要声明一个ConcreteComponent类型的变量,而应当声明一个Component类型的变量。  

半透明的装饰模式

  然而,纯粹的装饰模式很难找到。装饰模式的用意是在不改变接口的前提下,增强所考虑的类的功能。在增强功能的时候,往往需要建立新的公开方法。

  这就导致了大多数的装饰模式的实现都是“半透明”的,而不是完全透明的。换言之,允许装饰模式改变接口,增加新的方法。这意味着客户端可以声明ConcreteDecorator类型的变量,从而可以调用ConcreteDecorator类中才有的方法:

TheGreatestSage sage = new Monkey();
Bird bird = new Bird(sage);
bird.fly();

  半透明的装饰模式是介于装饰模式和适配器模式之间的。适配器模式的用意是改变所考虑的类的接口,也可以通过改写一个或几个方法,或增加新的方法来增强或改变所考虑的类的功能。大多数的装饰模式实际上是半透明的装饰模式,这样的装饰模式也称做半装饰、半适配器模式。

装饰模式的优点

  (1)装饰模式与继承关系的目的都是要扩展对象的功能,但是装饰模式可以提供比继承更多的灵活性。装饰模式允许系统动态决定“贴上”一个需要的“装饰”,或者除掉一个不需要的“装饰”。继承关系则不同,继承关系是静态的,它在系统运行前就决定了。

  (2)通过使用不同的具体装饰类以及这些装饰类的排列组合,设计师可以创造出很多不同行为的组合。

装饰模式的缺点

  由于使用装饰模式,可以比使用继承关系需要较少数目的类。使用较少的类,当然使设计比较易于进行。但是,在另一方面,使用装饰模式会产生比使用继承关系更多的对象。更多的对象会使得查错变得困难,特别是这些对象看上去都很相像。


设计模式在JAVA I/O库中的应用

  装饰模式在Java语言中的最著名的应用莫过于Java I/O标准库的设计了。

  由于Java I/O库需要很多性能的各种组合,如果这些性能都是用继承的方法实现的,那么每一种组合都需要一个类,这样就会造成大量性能重复的类出现。而如果采用装饰模式,那么类的数目就会大大减少,性能的重复也可以减至最少。因此装饰模式是Java I/O库的基本模式。

  Java I/O库的对象结构图如下,由于Java I/O的对象众多,因此只画出InputStream的部分。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABCwAAAD5CAIAAABjzDNIAAAgAElEQVR4nO3dT2gb6fnAcRXapC1hmxKnTjeHVWhUG0Ko6x4cgsIaikkCxcQ+hC2BxiAfzEKaHETIKetSlNycizY5LCYHHQLZQ/ChJD3pkpKLIOkpuBDcXmRy8kGIHOd3ePDze/edkTwezYxevfp+GJasLI/eed/n/fPMH7kQAAAAAECOCsMuAAAAAIDxQhICAAAAIFckIQAAAAByRRICAAAAIFckIQAAAAByRRICAAAAIFckIQAAAAByRRICAAAAIFckIQAAAAByRRICAAAAIFckIQAAAA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7hWPZ5d3D67KrTJDL8mAG0uN/tvr+wuv7y+QhBAMibePj5clioZekkNtBMPgG9MEMFoIdK94PLt4s7HUYNONYGDTjWBg040kBGOCQPcKs4v7G0sNNt0IBjbdCAY23UhCMCYIdK8wu7i/sdRg041gYNONYGDTjSQEY4JA98qRn/y4ALcd+cmPCQYIggGKYIDKLRiA4SIJ8UqB0yfOy62NCAb3EQxQBAMUbYQxQaB7hZHLfSw1oAgGKIIBijbCmCDQvcLI5T6WGlAEAxTBAEUbYUwQ6F5h5HIfSw0oggGKYICijTAmCHSvMHK5j6UGFMEARTBA0UYYEwS6Vxi53MdSA4pggCIYoGgjjAkC3SuMXO5jqQFFMEARDFC0EcYEge4VRi73sdSAIhigCAYo2ghjgkD3CiOX+1hqQBEMUAQDFG2EMUGge4WRy30sNaAIBiiCAYo2wpgg0L3CyOU+lhpQBAMUwQBFG2FMEOheYeRyH0sNKIIBimCAoo0wJgh0rzByuY+lBhTBAEUwQNFGGBMEulcYudzHUgOKYIAiGKBoI4wJAt0rjFzuY6kBRTBAEQxQtBHGBIHuFUYu97HUgCIYoAgGKNoIY4JA98rx48cLcNvx48cJBgiCAYpggMotGIDhIgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5IgkBAAAAkCuSEAAAAAC5+j8KvaDFQJIk0gAAAABJRU5ErkJggg==" alt="" />

  根据上图可以看出:

  ●  抽象构件(Component)角色:由InputStream扮演。这是一个抽象类,为各种子类型提供统一的接口。

  ●  具体构件(ConcreteComponent)角色:由ByteArrayInputStream、FileInputStream、PipedInputStream、StringBufferInputStream等类扮演。它们实现了抽象构件角色所规定的接口。

  ●  抽象装饰(Decorator)角色:由FilterInputStream扮演。它实现了InputStream所规定的接口。

  ●  具体装饰(ConcreteDecorator)角色:由几个类扮演,分别是BufferedInputStream、DataInputStream以及两个不常用到的类LineNumberInputStream、PushbackInputStream。

半透明的装饰模式

  装饰模式和适配器模式都是“包装模式(Wrapper Pattern)”,它们都是通过封装其他对象达到设计的目的的,但是它们的形态有很大区别。

  理想的装饰模式在对被装饰对象进行功能增强的同时,要求具体构件角色、装饰角色的接口与抽象构件角色的接口完全一致。而适配器模式则不然,一般而言,适配器模式并不要求对源对象的功能进行增强,但是会改变源对象的接口,以便和目标接口相符合。

  装饰模式有透明和半透明两种,这两种的区别就在于装饰角色的接口与抽象构件角色的接口是否完全一致。透明的装饰模式也就是理想的装饰模式,要求具体构件角色、装饰角色的接口与抽象构件角色的接口完全一致。相反,如果装饰角色的接口与抽象构件角色接口不一致,也就是说装饰角色的接口比抽象构件角色的接口宽的话,装饰角色实际上已经成了一个适配器角色,这种装饰模式也是可以接受的,称为“半透明”的装饰模式,如下图所示。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvgAAADhCAIAAAAyBlbOAAAgAElEQVR4nO2d/VMUV77/55+Isa5UQRWMyZZPu8K3NgMD6aoVYjQoLKDmbi4PA/iAD4CD7ooPIAiKgkTAREU0gCYRFTVeHo26IuCNItGwgohGcxdBSNwoRHfNgv394RPOPemeHgemh2Fm3q/6VKr79Dmnz0DnzMvPOTNoRAAAAAAAJ0Vj7wEAAAAAANgKiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA4AAAAAnBaIDgAAAACcFogOAAAAAJwWiA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AAA4LRAdAAAAADgtEB0AAAAAOC0QHQAAAAA4LRAdAAAAADgtEB0AAAAAOC0QHQAAAAA4Lf8fyaip3Svb74gAAAAASUVORK5CYII=" alt="" />

  在适配器模式里面,适配器类的接口通常会与目标类的接口重叠,但往往并不完全相同。换言之,适配器类的接口会比被装饰的目标类接口宽。

  显然,半透明的装饰模式实际上就是处于适配器模式与装饰模式之间的灰色地带。如果将装饰模式与适配器模式合并成为一个“包装模式”的话,那么半透明的装饰模式倒可以成为这种合并后的“包装模式”的代表。

InputStream类型中的装饰模式

  InputStream类型中的装饰模式是半透明的。为了说明这一点,不妨看一看作装饰模式的抽象构件角色的InputStream的源代码。这个抽象类声明了九个方法,并给出了其中八个的实现,另外一个是抽象方法,需要由子类实现。

public abstract class InputStream implements Closeable {

    public abstract int read() throws IOException;

    public int read(byte b[]) throws IOException {}

    public int read(byte b[], int off, int len) throws IOException {}

    public long skip(long n) throws IOException {}

    public int available() throws IOException {}

    public void close() throws IOException {}

    public synchronized void mark(int readlimit) {}

    public synchronized void reset() throws IOException {}

    public boolean markSupported() {}

}

  

  下面是作为装饰模式的抽象装饰角色FilterInputStream类的源代码。可以看出,FilterInputStream的接口与InputStream的接口是完全一致的。也就是说,直到这一步,还是与装饰模式相符合的。

public class FilterInputStream extends InputStream {
protected FilterInputStream(InputStream in) {} public int read() throws IOException {} public int read(byte b[]) throws IOException {} public int read(byte b[], int off, int len) throws IOException {} public long skip(long n) throws IOException {} public int available() throws IOException {} public void close() throws IOException {} public synchronized void mark(int readlimit) {} public synchronized void reset() throws IOException {} public boolean markSupported() {}
}

  

  下面是具体装饰角色PushbackInputStream的源代码。

public class PushbackInputStream extends FilterInputStream {
private void ensureOpen() throws IOException {} public PushbackInputStream(InputStream in, int size) {} public PushbackInputStream(InputStream in) {} public int read() throws IOException {} public int read(byte[] b, int off, int len) throws IOException {} public void unread(int b) throws IOException {} public void unread(byte[] b, int off, int len) throws IOException {} public void unread(byte[] b) throws IOException {} public int available() throws IOException {} public long skip(long n) throws IOException {} public boolean markSupported() {} public synchronized void mark(int readlimit) {} public synchronized void reset() throws IOException {} public synchronized void close() throws IOException {}
}

  查看源码,你会发现,这个装饰类提供了额外的方法unread(),这就意味着PushbackInputStream是一个半透明的装饰类。换言 之,它破坏了理想的装饰模式的要求。如果客户端持有一个类型为InputStream对象的引用in的话,那么如果in的真实类型是 PushbackInputStream的话,只要客户端不需要使用unread()方法,那么客户端一般没有问题。但是如果客户端必须使用这个方法,就 必须进行向下类型转换。将in的类型转换成为PushbackInputStream之后才可能调用这个方法。但是,这个类型转换意味着客户端必须知道它 拿到的引用是指向一个类型为PushbackInputStream的对象。这就破坏了使用装饰模式的原始用意。

  现实世界与理论总归是有一段差距的。纯粹的装饰模式在真实的系统中很难找到。一般所遇到的,都是这种半透明的装饰模式。

  下面是使用I/O流读取文件内容的简单操作示例。

public class IOTest {

    public static void main(String[] args) throws IOException {
// 流式读取文件
DataInputStream dis = null;
try{
dis = new DataInputStream(
new BufferedInputStream(
new FileInputStream("test.txt")
)
);
//读取文件内容
byte[] bs = new byte[dis.available()];
dis.read(bs);
String content = new String(bs);
System.out.println(content);
}finally{
dis.close();
}
} }

  观察上面的代码,会发现最里层是一个FileInputStream对象,然后把它传递给一个BufferedInputStream对象,经过BufferedInputStream处理,再把处理后的对象传递给了DataInputStream对象进行处理,这个过程其实就是装饰器的组装过程,FileInputStream对象相当于原始的被装饰的对象,而BufferedInputStream对象和DataInputStream对象则相当于装饰器。

Android 装饰器模式的实例:

Context类中也存在装饰者模式的运用,大家看源码中

  • abstract class Context是抽象类就是装饰者模式的Component:组件对象接口。
  • 而真正的实现是在ContextImpl中完成,它继承自Context抽象类并实现抽象方法。是ConcreteComponent:具体的组件对象,实现组件对象接口,就是被装饰的原始对象。
  • 而Decorator所有装饰器的抽象父类是ContextWrapper。从代码上看是完全和装饰者模式一样的实现。内部持有一个Component对象,就是持有一个被装饰的对象。
 public class ContextWrapper extends Context {
Context mBase; public ContextWrapper(Context base) {
mBase = base;
} //省略代码 只看这个方法
@Override
public void startActivity(Intent intent) {
mBase.startActivity(intent);
}
  • 最后谁是具体的装饰器对象呢?其实就是我们的Activity、Service和Application这些能够启动Activity的实现类啊。只是我们一般没有重写startActivity()方法由系统调用了我们没有注意到。

借用一张UML图可以很好的说明它们之前的关系: 
Java设计模式---装饰模式