1 16 17 package org.apache.commons.jexl.util; 18 19 import java.lang.reflect.InvocationTargetException ; 20 21 import org.apache.commons.logging.Log; 22 23 24 35 public class GetExecutor extends AbstractExecutor { 36 40 private final Object [] args = new Object [1]; 41 42 51 public GetExecutor(Log r, 52 org.apache.commons.jexl.util.introspection.Introspector ispect, 53 Class c, String key) throws Exception { 54 rlog = r; 55 args[0] = key; 56 method = ispect.getMethod(c, "get", args); 57 } 58 59 62 public Object execute(Object o) 63 throws IllegalAccessException , InvocationTargetException { 64 if (method == null) { 65 return null; 66 } 67 68 return method.invoke(o, args); 69 } 70 71 } 72 73 | Popular Tags |