1 55 package org.jboss.axis.utils.bytecode; 56 57 import org.jboss.axis.utils.Messages; 58 import org.jboss.logging.Logger; 59 60 import java.io.IOException ; 61 import java.lang.reflect.Method ; 62 import java.lang.reflect.Proxy ; 63 64 70 public class ParamNameExtractor 71 { 72 73 private static Logger log = Logger.getLogger(ParamNameExtractor.class.getName()); 74 75 80 public static String [] getParameterNamesFromDebugInfo(Method method) 81 { 82 int numParams = method.getParameterTypes().length; 84 if (numParams == 0) 85 return null; 86 87 Class c = method.getDeclaringClass(); 89 90 if (Proxy.isProxyClass(c)) 92 { 93 return null; 94 } 95 96 try 97 { 98 ParamReader pr = new ParamReader(c); 100 String [] names = pr.getParameterNames(method); 102 return names; 103 } 104 catch (IOException e) 105 { 106 log.info(Messages.getMessage("error00") + ":" + e); 108 return null; 109 } 110 } 111 } | Popular Tags |