Returns the methods declared by the target class and any of its super classes, which matches the supplied
methodFilter.

@param methodFilter
The method filter to apply.

@return methods that match the methodFilter.
341567
public static Set<Method> getMethods(Class<?> target, MethodFilter methodFilter) {
        Class<?> clazz = target;
        Set<Method> matches = getDeclaredMethods(clazz, methodFilter);      
        while((clazz = clazz.getSuperclass()) != null) {     
            matches.addAll(getDeclaredMethods(clazz, methodFilter));
        }
        return matches;
    }
566600
static public Accessor[] getAccessors(Class<?> type, FieldFilter filter) {
		Class<?> nextClass = type;
		HashMap<String, Accessor> map = new HashMap<String, Accessor>();
		if (filter == null)
			filter = BasicFiledFilter.SINGLETON;
		while (nextClass != Object.class) {
			Field[] declaredFields = nextClass.getDeclaredFields();

			for (Field field : declaredFields) {
				String fn = field.getName();
				if (map.containsKey(fn))
					continue;
				Accessor acc = new Accessor(nextClass, field, filter);
				if (!acc.isUsable())
					continue;
				map.put(fn, acc);
			}
			nextClass = nextClass.getSuperclass();
		}
		return map.values().toArray(new Accessor[map.size()]);
	}
1223666
public Collection<Project> getTargetedBy(ProjectFilter filter) {
        filter = (filter != null) ? filter : new ProjectFilter();

        filter.targets.clear();
        filter.targets.add(this);
        return getInstance().get().projects(filter);
    }
248352
@Override
    public Iterable<T> findAll(EntityFilter<T> filter) {
        List<T> results = new ArrayList<>();
        for (T object : findAll()) {
            if (filter.accept(object)) {
                results.add(object);
            }
        }
        return results;
    }
332476
public static Map<Object, Object> getAllSetterMethodWithCache(Class<?> pvClass, String pvFilter[]) {
		Map<Object, Object> lvMap = classPropertiesCacheSetter.getClassPropertiesMapByClass(pvClass);
		if (lvMap == null) {
			lvMap = getAllSetterMethod(pvClass);
			classPropertiesCacheSetter.addClassPropertiesMap(pvClass, lvMap);
		}
		lvMap = Util.filterMapByKeys(lvMap, pvFilter);
		return lvMap;
	}
1089038
public Method[] findAdaptMethodsFrom(Class from) {
        Method[] methods = mAdaptMethods;
        List<Method> candidates = new ArrayList<Method>(methods.length);
        for (int i=methods.length; --i>=0; ) {
            Method method = methods[i];
            if (method.getParameterTypes()[0].isAssignableFrom(from)) {
                candidates.add(method);
            }
        }
        return (Method[]) candidates.toArray(new Method[candidates.size()]);
    }
1262022
public static Set<MethodSymbol> findMatchingMethods(
      Name name, final Predicate<MethodSymbol> predicate, Type startClass, Types types) {
    Filter<Symbol> matchesMethodPredicate =
        sym -> sym instanceof MethodSymbol && predicate.apply((MethodSymbol) sym);

    Set<MethodSymbol> matchingMethods = new HashSet<>();
    // Iterate over all classes and interfaces that startClass inherits from.
    for (Type superClass : types.closure(startClass)) {
      // Iterate over all the methods declared in superClass.
      TypeSymbol superClassSymbol = superClass.tsym;
      Scope superClassSymbols = superClassSymbol.members();
      if (superClassSymbols != null) { // Can be null if superClass is a type variable
        for (Symbol symbol :
            superClassSymbols.getSymbolsByName(name, matchesMethodPredicate, NON_RECURSIVE)) {
          // By definition of the filter, we know that the symbol is a MethodSymbol.
          matchingMethods.add((MethodSymbol) symbol);
        }
      }
    }
    return matchingMethods;
  }
842211
private static Method getMethod(final Class cls, final String methodName, boolean declared) {
		$.checkNotEmpty(methodName);
		List<Method> methods = getMethodsList(cls, declared);
		for (int i = 0; i < methods.size(); i++) {
			if (methodName.equals(methods.get(i).getName())) {
				return methods.get(i);
			}
		}
		return null;
	}
986814
public Collection<Member> members(MemberFilter filter) {
        return get(Member.class, (filter != null) ? filter : new MemberFilter());
    }
334981
public List<Method> getMethodsFromGroupIds(int[] groupIds, String[] filters) throws Exception {
        ArrayList<Method> methods = new ArrayList<Method>();

        for (int groupId : groupIds) {
            methods.addAll(getMethodsFromGroupId(groupId, filters));
        }

        return methods;
    }
191198
public static MethodCallExpression applyDefaultMethodTarget(final MethodCallExpression methodCallExpression, final Class<?> targetClass) {
        return applyDefaultMethodTarget(methodCallExpression, ClassHelper.make(targetClass).getPlainNodeReference());
    }
72400
public static List<Method> getPublicMethods(Class<?> clazz, Filter<Method> filter) {
		if (null == clazz) {
			return null;
		}

		final Method[] methods = getPublicMethods(clazz);
		List<Method> methodList;
		if (null != filter) {
			methodList = new ArrayList<>();
			for (Method method : methods) {
				if (filter.accept(method)) {
					methodList.add(method);
				}
			}
		} else {
			methodList = CollectionUtil.newArrayList(methods);
		}
		return methodList;
	}
1034868
public Set<Method> getMethodsReturn(Class returnType) {
        return getMethodsFromDescriptors(store.get(index(MethodParameterScanner.class), names(returnType)), loaders());
    }
304819
public ClassDoc[] innerClasses(boolean filter) {
        ListBuffer<ClassDocImpl> innerClasses = new ListBuffer<>();
        for (Symbol sym : tsym.members().getSymbols(NON_RECURSIVE)) {
            if (sym != null && sym.kind == TYP) {
                ClassSymbol s = (ClassSymbol)sym;
                if ((s.flags_field & Flags.SYNTHETIC) != 0) continue;
                if (!filter || env.isVisible(s)) {
                    innerClasses.prepend(env.getClassDoc(s));
                }
            }
        }
        //### Cache classes here?
        return innerClasses.toArray(new ClassDocImpl[innerClasses.length()]);
    }
177125
public static List<Method> getPublicMethods(Class<?> clazz, Filter<Method> filter) {
		return ReflectUtil.getPublicMethods(clazz, filter);
	}
72274
public static List<ExecutableElement>
            methodsIn(Iterable<? extends Element> elements) {
        return listFilter(elements, METHOD_KIND, ExecutableElement.class);
    }
559474
public static <T extends MethodDescription> ElementMatcher.Junction<T> isMethod() {
        return new MethodSortMatcher<T>(MethodSortMatcher.Sort.METHOD);
    }