1 55 package org.jboss.axis.encoding.ser; 56 57 import org.jboss.axis.utils.ClassUtils; 58 59 import javax.xml.namespace.QName ; 60 import java.lang.reflect.Method ; 61 62 68 public abstract class BaseFactory 69 { 70 73 protected Method getMethod(Class clazz, String methodName) 74 { 75 Method method = null; 76 try 77 { 78 method = clazz.getMethod(methodName, new Class []{String .class, Class .class, QName .class}); 79 } 80 catch (NoSuchMethodException e) 81 { 82 } 83 if (method == null) 84 { 85 try 86 { 87 Class helper = ClassUtils.forName(clazz.getName() + "_Helper"); 88 method = helper.getMethod(methodName, new Class []{String .class, Class .class, QName .class}); 89 } 90 catch (NoSuchMethodException e) 91 { 92 } 93 catch (ClassNotFoundException e) 94 { 95 } 96 } 97 98 return method; 99 } 100 } 101 | Popular Tags |