Convenience method for retrieving a {@link Method} from a class.

@see Class#getMethod(String, Class...)
161125
public static Method createMethod(Class<?> clazz, String methodName, Class<?>... params) {
    try {
      return clazz.getMethod(methodName, params);
    } catch (NoSuchMethodException | SecurityException e) {
      throw new IllegalArgumentException(e);
    }
  }
517010
static Method getMethod(Class<?> type, Method m) {
        if (m == null || Modifier.isPublic(type.getModifiers())) {
            return m;
        }
        Class<?>[] inf = type.getInterfaces();
        Method mp = null;
        for (int i = 0; i < inf.length; i++) {
            try {
                mp = inf[i].getMethod(m.getName(), m.getParameterTypes());
                mp = getMethod(mp.getDeclaringClass(), mp);
                if (mp != null) {
                    return mp;
                }
            } catch (NoSuchMethodException e) {
                // Ignore
            }
        }
        Class<?> sup = type.getSuperclass();
        if (sup != null) {
            try {
                mp = sup.getMethod(m.getName(), m.getParameterTypes());
                mp = getMethod(mp.getDeclaringClass(), mp);
                if (mp != null) {
                    return mp;
                }
            } catch (NoSuchMethodException e) {
                // Ignore
            }
        }
        return null;
    }
1355761
public function getMethod ($method)
	{
		
		// Get methods
		
		$this->getMethods ();
		
		// Loop through the methods
		
		foreach ($this->methods as $obj)
		{
			
			// If the method names match return 
			
			if (strtolower ($obj->get ('name')) == strtolower ($method))
			{
				return $obj;
			}
			
		}
		
		// Return FALSE
		
		return FALSE;
		
	}
1276007
public String getMethodName() {
        if (!visitingMethod) {
            throw new IllegalStateException("getMethodName called while not visiting method");
        }
        if (methodName == null) {
            methodName = getStringFromIndex(method.getNameIndex());
        }

        return methodName;
    }
974941
public MethodDoc getMatchingMethod(MethodDoc method, MethodFinder mf) {

        MethodDoc md = getMatchingMethod(method);
        if (md != null) {
            if (mf.checkMethod(md)) {
                return md;
            }
        }

        return null;
    }
935484
public static Method getMethod(final Class<?> clazz, final String methodName, Class<?>... parameterTypes) {
		Method method = MethodUtils.getMatchingMethod(clazz, methodName, parameterTypes);
		if (method != null) {
			makeAccessible(method);
		}
		return method;
	}
1287992
@Override
    public String getMethod() {
        String method = this.request.getMethod();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getMethod: " + method);
        }
        return method;
    }
421300
static String getMethodFQN(Method m) {
        return m == null ? null
                         : m.getDeclaringClass().getName() + '.' + m.getName();
    }
828539
public static MethodDescriptor getMethodDescriptor(JavaClass jclass, Method method) {
        return DescriptorFactory.instance().getMethodDescriptor(jclass.getClassName().replace('.', '/'), method.getName(),
                method.getSignature(), method.isStatic());
    }
53660
def get_method(self, method_name, default=None):
        
        for method in self.methods:
            if method.name == method_name:
                return method
        return default
196211
public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationClass) {
        A annotation = method.getAnnotation(annotationClass);
        if (annotation == null) {
            for (Annotation metaAnnotation : method.getAnnotations()) {
                annotation = metaAnnotation.annotationType().getAnnotation(annotationClass);
                if (annotation != null) {
                    return annotation;
                }
            }
            Method superclassMethod = getOverriddenMethod(method);
            if (superclassMethod != null) {
                annotation = getAnnotation(superclassMethod, annotationClass);
            }
        }
        return annotation;
    }
837778
def get_method(self, node):
        '''
        '''
        methods = self._methods
        for methodname in self.get_methodnames(node):
            if methodname in methods:
                return methods[methodname]
            else:
                cls = self.__class__
                method = getattr(cls, methodname, None)
                if method is not None:
                    methods[methodname] = method
                    return method
1069089
private MethodConfig getMethodConfig(String methodName) {
        if (methods == null) {
            return null;
        }
        return methods.get(methodName);
    }
676066
private Method findToStringMethod(Class<?> cls, String methodName) {
        Method m;
        try {
            m = cls.getMethod(methodName);
        } catch (NoSuchMethodException ex) {
            throw new IllegalArgumentException(ex);
        }
        if (Modifier.isStatic(m.getModifiers())) {
            throw new IllegalArgumentException("Method must not be static: " + methodName);
        }
        return m;
    }
1279800
private static String getClassMethod(Class clazz, Method method) {
		StringBuilder builder = new StringBuilder();
		builder.append(clazz.getName()).append(".").append(method.getName());
		builder.append("(");
		if (method.getParameterCount() > 0) {
			for (int i = 0; i < method.getParameterCount(); i++) {
				Parameter param = method.getParameters()[i];
				builder.append(param.getType().getSimpleName()).append(" ").append(param.getName());

				if (i + 1 < method.getParameterCount()) {
					builder.append(", ");
				}
			}
		}
		builder.append(")");
		return builder.toString();
	}
854352
public static Method findMethod(Class<?> clazz, String name) {
		for (Method me : clazz.getDeclaredMethods()) {
			if (me.getName().equalsIgnoreCase(name)) {
				return me;
			}
		}
		if (clazz.getSuperclass() != null) {
			return findMethod(clazz.getSuperclass(), name);
		}
		return null;
	}
1209653
private static Method findGetMethod(Class<? extends Bean> beanType, String getterName) {
        try {
            return beanType.getDeclaredMethod(getterName);
        } catch (NoSuchMethodException ex) {
            try {
                return beanType.getMethod(getterName);
            } catch (NoSuchMethodException ex2) {
                return null;
            }
        }
    }