Get all methods of a given kind using a given {@link MethodListBuilder}.
10241
private static <T, R> R getMethods(EnhancedAnnotatedType<T> type, MethodListBuilder<T, R> builder) {
        Collection<EnhancedAnnotatedMethod<?, ? super T>> methods = filterMethods(builder.getAllMethods(type));
        for (Class<? super T> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
            builder.levelStart(clazz);
            for (EnhancedAnnotatedMethod<?, ? super T> method : methods) {
                if (method.getJavaMember().getDeclaringClass().equals(clazz)) {
                    builder.processMethod(method);
                }
            }
            builder.levelFinish();
        }
        return builder.create();
    }
249657
private List<MethodNode> getMethods(String name, List<MethodNode> methods) {
        List<MethodNode> result = new ArrayList<MethodNode>();
        for (MethodNode mn : methods) {
            if (name.equals(mn.name)) {
                result.add(mn);
            }
        }
        return result;
    }
80248
public Collection<Method> getAllMethods(String name) {
        final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name);
        if (nameMap == null) {
            return Collections.emptySet();
        }
        final Collection<Method> methods = new ArrayList<Method>();
        for (Map<Class<?>, Method> map : nameMap.values()) {
            methods.addAll(map.values());
        }
        return methods;
    }
542801
public static <R> Function<Object,List<R>> listOf(final Type<R> resultType, final String methodName, final Object... optionalParameters) {
        return methodForListOf(resultType, methodName, optionalParameters);
    }
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;
    }
1173965
public static Method[] getDeclaredMethods(Class clazz) {
	Method[] methods = clazz.getMethods();
	ArrayList list = new ArrayList();
	for (int i = 0; i < methods.length; i++) {
	    if (methods[i].getDeclaringClass() == clazz) list.add(methods[i]);
	}
	if (list.size() == 0) return new Method[0];
	return (Method[]) list.toArray(new Method[list.size()]);
    }
931012
public static List<Method> methodsOf(Class<?> type) {
        if (type == null) {
            throw new IllegalArgumentException("Method argument type must not be null");
        }
        List<Method> methods = new LinkedList<>();
        Queue<Class<?>> classes = new LinkedList<>();
        classes.add(type);
        while (!classes.isEmpty()) {
            Class<?> c = classes.poll();
            methods.addAll(asList(c.getDeclaredMethods()));
            if (c.getSuperclass() != null) {
                classes.add(c.getSuperclass());
            }
            addAll(classes, c.getInterfaces());
        }
        return methods;
    }
383124
public static Method[] getAllMethodsByClass (Class<?> pvClass) {
		return getAllMethodsByClassIntern(pvClass, new HashSet<Method>()).toArray(new Method [0]);
	}
500434
public static List<Method> getAllDeclaredMethods(Class<?> clazz) {
		List<Method> result = new ArrayList<>();
		while (clazz != null) {
			Method[] methods = clazz.getDeclaredMethods();
			Collections.addAll(result, methods);
			clazz = clazz.getSuperclass();
		}
		return result;
	}
764325
protected List<ExecutableElement> getOrderedMethods(TypeElement typeElement, Comparator<ExecutableElement> comparator) {
		List<ExecutableElement> methods = ElementFilter.methodsIn(typeElement.getEnclosedElements());
		Collections.sort(methods, comparator);
		return methods;
	}
92494
public GroovyMethodDoc[] methods() {
        Collections.sort(methods);
        return methods.toArray(new GroovyMethodDoc[methods.size()]);
    }
628973
def get_all_methods
      methods = []
      each_type do | type |
        type.each_method do |meth|
          methods << meth
        end
      end
      methods
    end
157633
public static List<Method> getAllAnnotationPresentMethod(Class<?> type,
                                                             Class<? extends Annotation> annotation) {
        List<Method> methods = getAllMethod(type);

        if (methods.isEmpty()) {
            return Collections.emptyList();
        }

        return methods.stream().filter(method -> method.isAnnotationPresent(annotation))
            .collect(Collectors.toList());
    }
382787
public AbstractBuilder getMethodBuilder(ClassWriter classWriter) {
        return MethodBuilder.getInstance(context, classWriter.getTypeElement(),
            writerFactory.getMethodWriter(classWriter));
    }
251171
public static Set<Method> getAllMethods(Class<?> classs) {
    Set<Method> set = new HashSet<>();
    Class<?> c = classs;
    while (c != null) {
      set.addAll(Arrays.asList(c.getDeclaredMethods()));
      c = c.getSuperclass();
    }
    return set;
  }
1281515
public List<MetaMethod> getMethods() {
        List<MetaMethod> methodList = new ArrayList<MetaMethod>();
        methodList.addAll(this.expandoMethods.values());
        methodList.addAll(super.getMethods());
        return methodList;
    }
1280829
private static <T> List<Method> getMethods(Class<T> type, String... names) {

		Assert.notNull(type, "Missing class to search for methods!");
		Assert.notNullOrEmpty(names, "Missing method names to search for!");

		Map<String, Method> candidates = new HashMap<>();
		for (Method method : type.getMethods()) {

			if (Modifier.isStatic(method.getModifiers()) &&
			    method.getReturnType().equals(type) &&
			    method.getParameterTypes().length == 1 &&
			    method.getParameterTypes()[0].isAssignableFrom(String.class)) {

				candidates.put(method.getName(), method);
			}
		}

		List<Method> output = new ArrayList<>();

		// go in order desired
		for (String name : names) {
			if (candidates.containsKey(name)) {
				output.add(candidates.get(name));
			}
		}

		return output;
	}