Get a MethodDoc in this ClassDoc with a name and signature
matching that of the specified MethodDoc and accepted by the
specified MethodFinder
974941
public MethodDoc getMatchingMethod(MethodDoc method, MethodFinder mf) {

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

        return null;
    }
89346
private IMethodInfo getSingleMethodWithName( String methodName, IType typeToResolveAgainst, ITypeInfo typeInfo )
  {
    MethodList methods;
    if( typeInfo instanceof IRelativeTypeInfo )
    {
      methods = ((IRelativeTypeInfo)typeInfo).getMethods( typeToResolveAgainst );
    }
    else
    {
      methods = typeInfo.getMethods();
    }

    IMethodInfo match = null;
    for( IMethodInfo possibleMatch : methods )
    {
      if( possibleMatch.getDisplayName().equals( methodName ) )
      {
        if( match != null )
        {
          return null; // more than one, bail
        }
        else
        {
          match = possibleMatch;
        }
      }
    }
    return match;
  }
53660
def get_method(self, method_name, default=None):
        
        for method in self.methods:
            if method.name == method_name:
                return method
        return default
478525
public static Method findMethod(Method methodToFind, Class<?> cls) {
        if (cls == null) {
            return null;
        }
        String methodToSearch = methodToFind.getName();
        Class<?>[] soughtForParameterType = methodToFind.getParameterTypes();
        Type[] soughtForGenericParameterType = methodToFind.getGenericParameterTypes();
        for (Method method : cls.getMethods()) {
            if (method.getName().equals(methodToSearch) && method.getReturnType().isAssignableFrom(methodToFind.getReturnType())) {
                Class<?>[] srcParameterTypes = method.getParameterTypes();
                Type[] srcGenericParameterTypes = method.getGenericParameterTypes();
                if (soughtForParameterType.length == srcParameterTypes.length &&
                    soughtForGenericParameterType.length == srcGenericParameterTypes.length) {
                    if (hasIdenticalParameters(srcParameterTypes, soughtForParameterType, srcGenericParameterTypes, soughtForGenericParameterType)) {
                        return method;
                    }
                }
            }
        }
        return null;
    }
1182073
public static List<Method> retrieveMethodList(final Class<?> cls, final String methodName) {
        final List<Method> methodList = new ArrayList<>();
        final String camelCasedMethodName = underscoreToCamelCase(methodName);
        for (final Method m : cls.getMethods()) {
            if (m.getName().equals(camelCasedMethodName) || m.getName().equals(methodName)) {
                methodList.add(m);
            }
        }
        return methodList;
    }
1350995
public static PHPMethodDescriptor findMethod(PHPClassDescriptor desc, String methodName) {
		PHPMethodDescriptor meth;
		meth = desc.getMethod(Helper.formatProcedureName(methodName));
		if (meth != null) {
			return meth;
		}
		meth = desc.getMethod("get" + Helper.formatProcedureName(methodName));
		if (meth != null) {
			return meth;
		}
		return null;
	}
573083
def get_method_docstring(cls, method_name):
    
    method = getattr(cls, method_name, None)
    if method is None:
        return
    docstrign = inspect.getdoc(method)
    if docstrign is None:
        for base in cls.__bases__:
            docstrign = get_method_docstring(base, method_name)
            if docstrign:
                return docstrign
        else:
            return None

    return docstrign
352582
protected ArrayList<String> getClassKeyword(ClassDoc classdoc) {
        String cltypelower = classdoc.isInterface() ? "interface" : "class";
        ArrayList<String> metakeywords = new ArrayList<String>(1);
        metakeywords.add(classdoc.qualifiedName() + " " + cltypelower);
        return metakeywords;
    }
1069089
private MethodConfig getMethodConfig(String methodName) {
        if (methods == null) {
            return null;
        }
        return methods.get(methodName);
    }
644988
public MethodModel getMethodModel(String _name, String _signature) throws AparapiException {
      if (CacheEnabler.areCachesEnabled())
         return methodModelCache.computeIfAbsent(MethodKey.of(_name, _signature));
      else {
         final ClassModelMethod method = getMethod(_name, _signature);
         return new MethodModel(method);
      }
   }
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;
	}
226377
public static MethodBuilder getInstance(Context context,
            ClassDoc classDoc, MethodWriter writer) {
        return new MethodBuilder(context, classDoc, writer);
    }
1320952
private Object getMethods(Class sender, String name, boolean isCallToSuper) {
        Object answer;

        final MetaMethodIndex.Entry entry = metaMethodIndex.getMethods(sender, name);
        if (entry == null)
            answer = FastArray.EMPTY_LIST;
        else
            if (isCallToSuper) {
                answer = entry.methodsForSuper;
            } else {
                answer = entry.methods;
            }

        if (answer == null) answer = FastArray.EMPTY_LIST;

        if (!isCallToSuper) {
            List used = GroovyCategorySupport.getCategoryMethods(name);
            if (used != null) {
                FastArray arr;
                if (answer instanceof MetaMethod) {
                    arr = new FastArray();
                    arr.add(answer);
                }
                else
                    arr = ((FastArray) answer).copy();

                for (Iterator iter = used.iterator(); iter.hasNext();) {
                    MetaMethod element = (MetaMethod) iter.next();
                    if (!element.getDeclaringClass().getTheClass().isAssignableFrom(sender))
                      continue;
                    filterMatchingMethodForCategory(arr, element);
                }
                answer = arr;
            }
        }
        return answer;
    }
627391
function resolveMethods(classDoc) {
  let methods = classDoc.members.filter(member => member.hasOwnProperty('parameters'));

  if (classDoc.inheritedDoc) {
    methods = methods.concat(resolveMethods(classDoc.inheritedDoc));
  }

  return methods;
}
792408
private Class<? extends Object> getClassForClassDoc(final ClassDoc doc) {
        try {
            return DocletUtils.getClassForDoc(doc);
        } catch (ClassNotFoundException e) {
            // we got a classdoc for a class we can't find.  Maybe in a library or something
            return null;
        } catch (NoClassDefFoundError e) {
            return null;
        } catch (UnsatisfiedLinkError e) {
            return null; // naughty BWA bindings
        }
    }
497471
public ClassInfoList getClassesWithMethodAnnotation(final String methodAnnotationName) {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        if (!scanSpec.enableClassInfo || !scanSpec.enableMethodInfo || !scanSpec.enableAnnotationInfo) {
            throw new IllegalArgumentException("Please call ClassGraph#enableClassInfo(), #enableMethodInfo(), "
                    + "and #enableAnnotationInfo() before #scan()");
        }
        final ClassInfo classInfo = classNameToClassInfo.get(methodAnnotationName);
        return classInfo == null ? ClassInfoList.EMPTY_LIST : classInfo.getClassesWithMethodAnnotation();
    }
1368610
def _get_method_doc(self):
        
        ret = {}
        for method_name in self.methods:
            method = getattr(self, method_name, None)
            if method:
                ret[method_name] = method.__doc__
        return ret