1 18 19 package alt.jiapi.instrumentor; 20 21 import alt.jiapi.reflect.JiapiClass; 22 import alt.jiapi.reflect.InstructionList; 23 24 32 public class AddInterfaceInstrumentor extends AbstractInstrumentor { 33 private String [] interfaceNames; 34 35 public AddInterfaceInstrumentor(String interfaceName) { 36 this(new String [] {interfaceName}); 37 } 38 39 public AddInterfaceInstrumentor(String [] interfaceNames) { 40 this.interfaceNames = interfaceNames; 41 } 42 43 public void instrument(InstructionList il) { 44 JiapiClass clazz = getCurrentClass(); 45 46 for (int i = 0; i < interfaceNames.length; i++) { 47 clazz.addInterface(interfaceNames[i]); 48 } 49 50 forward(il); 51 } 52 } 53 54 | Popular Tags |