1 16 package org.apache.axis.utils.bytecode; 17 18 import org.apache.axis.components.logger.LogFactory; 19 import org.apache.axis.utils.Messages; 20 import org.apache.commons.logging.Log; 21 22 import java.io.IOException ; 23 import java.lang.reflect.Method ; 24 import java.lang.reflect.Proxy ; 25 26 32 public class ParamNameExtractor { 33 34 protected static Log log = 35 LogFactory.getLog(ParamNameExtractor.class.getName()); 36 37 42 public static String [] getParameterNamesFromDebugInfo(Method method) { 43 int numParams = method.getParameterTypes().length; 45 if (numParams == 0) 46 return null; 47 48 Class c = method.getDeclaringClass(); 50 51 if(Proxy.isProxyClass(c)) { 53 return null; 54 } 55 56 try { 57 ParamReader pr = new ParamReader(c); 59 String [] names = pr.getParameterNames(method); 61 return names; 62 } catch (IOException e) { 63 log.info(Messages.getMessage("error00") + ":" + e); 65 return null; 66 } 67 } 68 } | Popular Tags |