1 18 19 package alt.jiapi.instrumentor; 20 21 import org.apache.log4j.Category; 22 23 import alt.jiapi.reflect.InstructionList; 24 import alt.jiapi.reflect.JiapiClass; 25 import alt.jiapi.reflect.JiapiMethod; 26 import alt.jiapi.Runtime; 27 28 35 public class MethodDispatcherInstrumentor extends AbstractInstrumentor { 36 private static Category log = Runtime.getLogCategory(MethodDispatcherInstrumentor.class); 37 38 public MethodDispatcherInstrumentor() { 39 } 40 41 public void instrument(InstructionList il) { 42 JiapiClass clazz = getCurrentClass(); 43 JiapiMethod[] methods = clazz.getDeclaredMethods(); 44 45 for (int i = 0; i < methods.length; i++) { 46 log.debug("dispatching for: " + methods[i].getName()); 47 InstructionList _il = methods[i].getInstructionList(); 48 forward(_il); 49 } 50 } 51 } 52 | Popular Tags |