1 22 package org.jboss.aop.microcontainer.beans; 23 24 import org.jboss.aop.introduction.InterfaceIntroduction; 25 26 31 public class MixinBinding extends IntroductionBinding 32 { 33 34 protected String mixin; 35 36 37 protected String construction; 38 39 40 protected boolean trans; 41 42 public String getMixin() 43 { 44 return mixin; 45 } 46 47 public void setMixin(String mixinClass) 48 { 49 this.mixin = mixinClass; 50 } 51 52 public String getConstruction() 53 { 54 return construction; 55 } 56 57 public void setConstruction(String construction) 58 { 59 this.construction = construction; 60 } 61 62 public boolean isTransient() 63 { 64 return trans; 65 } 66 67 public void setTransient(boolean trans) 68 { 69 this.trans = trans; 70 } 71 72 public void start() throws Exception 73 { 74 if (manager == null) 75 throw new IllegalArgumentException ("Null manager"); 76 if (classes == null) 77 throw new IllegalArgumentException ("Null classes"); 78 if (interfaces == null) 79 throw new IllegalArgumentException ("Null interfaces"); 80 if (mixin == null) 81 throw new IllegalArgumentException ("Null interfaces"); 82 String [] intfs = interfaces.toArray(new String [interfaces.size()]); 83 InterfaceIntroduction introduction = new InterfaceIntroduction(name, classes, null); 84 introduction.addMixin(new InterfaceIntroduction.Mixin(mixin, intfs, construction, trans)); 85 manager.addInterfaceIntroduction(introduction); 86 } 87 } 88 | Popular Tags |