1 16 17 package org.apache.commons.jelly.tags.define; 18 19 import java.lang.reflect.Method ; 20 21 import org.apache.commons.beanutils.MethodUtils; 22 23 import org.apache.commons.logging.Log; 24 import org.apache.commons.logging.LogFactory; 25 26 27 35 public class JellyBeanTag extends BeanTag { 36 37 38 private static final Log log = LogFactory.getLog(JellyBeanTag.class); 39 40 41 private static final Class [] emptyParamTypes = {}; 42 43 44 private String method; 45 46 49 53 public String getMethod() { 54 if ( method == null ) { 55 return "run"; 56 } 57 return method; 58 } 59 60 66 public void setMethod(String method) { 67 this.method = method; 68 } 69 70 71 74 protected Method getInvokeMethod( Class theClass ) { 75 Method invokeMethod = 76 MethodUtils.getAccessibleMethod( 77 theClass, 78 getMethod(), 79 emptyParamTypes); 80 81 if ( invokeMethod == null ) { 82 } 83 return invokeMethod; 84 } 85 } 86 | Popular Tags |