@@ -0,0 +1,720 @@
+// --------------------- interface%0A%0Apublic interface Interface %7B%0A    void doSomething();%0A%7D%0A%0Apublic class Component implements Interface  %7B%0A    public void doSomething() %7B%0A        System.out.println(%22Component doSomething...%22);%0A    %7D%0A%7D%0A%0Apublic class Decorator implements Interface %7B%0A    private Interface component;%0A%0A    public Decorator(Interface component) %7B%0A        this.component = component;%0A    %7D%0A%0A    public void doSomething() %7B%0A        System.out.println(%22%E6%88%91%E8%A6%81%E5%BC%80%E5%A7%8B%E8%A3%85%E9%A5%B0%E4%BA%86...%22);%0A        this.component.doSomething();%0A    %7D%0A%7D%0A%0A// --------------------- test code%0A%0Apublic static void main(String%5B%5D args) %7B%0A    Interface component = new Component();%0A    Decorator proxy = new Decorator(component);%0A%0A    proxy.doSomething();%0A%7D%0A

add decorator pattern