public interface sourceable{
public void method();
}
class source implements sourceable{
public void method(){
System.out.println("this is orginal method");
}
}
class decotor implements sourceable{
private Sourceable source;
public void decotor(Sourceable sourece){
this.method();
}
public void method(){
System.out.println("this is 1 ");
source.method();
System.out.println("this is 2");
}
}
public class Test{
public void static void main(String[] args){
Sourceabe source=new Sourceable();
dector d=new dector(source);
d.method();
}
}