获得指定类过滤后的Public方法列表

@param clazz 查找方法的类
@param filter 过滤器
@return 过滤后的方法列表
177125
public static List<Method> getPublicMethods(Class<?> clazz, Filter<Method> filter) {
		return ReflectUtil.getPublicMethods(clazz, filter);
	}
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);
    }
1124460
public Collection<Link> links(LinkFilter filter) {
        return get(Link.class, (filter != null) ? filter : new LinkFilter());
    }
24290
public List<Class<?>> scanByFilter(String pack, List<ClassFilter> filters) {
        LOGGER.debug("开始扫描包{}下的所有类的集合", pack);
        // 第一个class类的集合
        List<Class<?>> classes = new ArrayList<>();
        // 获取包的名字 并进行替换
        String packageDirName = pack.replace('.', '/');
        // 定义一个枚举的集合 并进行循环来处理这个目录下的things
        Enumeration<URL> dirs;
        try {
            dirs = ClassUtils.getDefaultClassLoader().getResources(packageDirName);
        } catch (IOException e) {
            LOGGER.error("扫描包{}资源出错", packageDirName);
            throw new RuntimeException(e);
        }
        // 循环迭代下去
        while (dirs.hasMoreElements()) {
            try {
                // 获取下一个元素
                URL url = dirs.nextElement();
                // 得到协议的名称
                String protocol = url.getProtocol();
                // 如果是以文件的形式保存在服务器上
                if ("file".equals(protocol)) {
                    LOGGER.debug("file类型扫描");
                    // 获取包的物理路径
                    String filePath = URLDecoder.decode(url.getFile(),
                        Charset.defaultCharset().name());
                    // 以文件的方式扫描整个包下的文件 并添加到集合中
                    classes.addAll(findAndAddClassesInPackageByFile(pack, filePath, true));
                } else if ("jar".equals(protocol)) {
                    JarFile jar = ((JarURLConnection) url.openConnection()).getJarFile();
                    classes
                        .addAll(findAndAddClassesInPackageByFile(jar, packageDirName, pack, true));
                }
            } catch (Throwable e) {
                LOGGER.debug("扫描{}时出错", pack, e);
            }
        }

        if (!filters.isEmpty()) {
            LOGGER.debug("扫描完毕，扫描出来的Class集合为：{}，发现过滤器，使用过滤器过滤", classes);
            classes = classes.stream().filter(clazz -> filter(clazz, filters))
                .collect(Collectors.toList());
            LOGGER.debug("过滤后的Class为：{}", classes);
        }

        return classes;
    }
645419
public static MessageFilter compile(String filter) throws InvalidFilterException {
        MessageFilterParser parser = MessageFilterParser.createParser(filter);
        MessageFilterTranslatable t = parseToTranslatable(parser);
        MessageFilter translate = t.translate();
        if (BaseMessageFilter.class.isAssignableFrom(translate.getClass())) {
            ((BaseMessageFilter) translate).setOriginalDslString(filter);
        }

        return translate;
    }
1008786
public static sslpolicy[] get_filtered(nitro_service service, String filter) throws Exception{
		sslpolicy obj = new sslpolicy();
		options option = new options();
		option.set_filter(filter);
		sslpolicy[] response = (sslpolicy[]) obj.getfiltered(service, option);
		return response;
	}
943894
public static filteraction[] get_filtered(nitro_service service, String filter) throws Exception{
		filteraction obj = new filteraction();
		options option = new options();
		option.set_filter(filter);
		filteraction[] response = (filteraction[]) obj.getfiltered(service, option);
		return response;
	}
470222
public void setFilter(String filter) {
		if(filter == null || filter.length() == 0 ) {
			this.filter = null;
		} else {
			this.filter = filter;
		}
		
		// Reload the list of files.
		this.loadFolder(this.currentFolder);
	}
565418
@Override
	public Filter getFilter() {
		Filter filter = new Filter() {
			@Override
			protected FilterResults performFiltering(CharSequence constraint) {
				ArrayList<Pair<String, ?>> filteredPrefs = new ArrayList<Pair<String, ?>>();
				FilterResults filterFriends = new FilterResults();
				if (!SharedPreferenceUtils.isEmptyString(constraint)) {
					for (Pair<String, ?> keyValue : keyValSet) {
						String constraintString = constraint.toString();
						String prefixKey = "key: ";
						String prefixValue = "value: ";
						String first = keyValue.first;
						Object second = keyValue.second;
						if (constraintString.toLowerCase().startsWith(prefixKey)) {
							if (first.toLowerCase().contains(constraintString.toLowerCase().substring(prefixKey.length()))) {
								filteredPrefs.add(keyValue);
							}
						} else if (constraintString.toLowerCase().startsWith(prefixValue)) {
							if (second != null) {
								if (second.toString().contains(constraintString.toLowerCase().substring(prefixValue.length()))) {
									filteredPrefs.add(keyValue);
								}
							}
						} else {
							if (first.equalsIgnoreCase(constraintString) || (second != null && second.toString()
							                                                                         .equalsIgnoreCase(constraintString))) {
								filteredPrefs.add(keyValue);
							}
						}
					}
				} else {
					filteredPrefs = keyValSet;
				}
				filterFriends.count = filteredPrefs.size();
				filterFriends.values = filteredPrefs;
				return filterFriends;
			}

			@Override
			protected void publishResults(CharSequence constraint, FilterResults results) {
				filteredCollection = (ArrayList<Pair<String, ?>>) results.values;

				notifyDataSetChanged();
			}
		};
		return filter;
	}
617781
public final SC registerFilter(Class<? extends Filter> filterClass) {
        WebFilter webFilter = filterClass.getAnnotation(WebFilter.class);

        if (webFilter == null)
            throw new IllegalArgumentException(String.format("Missing annotation '%s' for class '%s'", WebFilter.class.getName(), filterClass.getName()));

        String[] urlPatterns = webFilter.value();

        if (urlPatterns.length == 0)
            urlPatterns = webFilter.urlPatterns();

        if (urlPatterns.length == 0)
            throw new IllegalArgumentException(String.format("Missing pattern mapping for '%s'", filterClass.getName()));

        for (String urlPattern : urlPatterns) {
            registerFilter(filterClass, urlPattern);
        }

        return (SC) this;
    }
989234
public void removeFilter(ClassNameFilter classNameFilter) {
        writeLock.lock();
        try {
            if (filters != null) {
                filters.remove(classNameFilter);
                // 删除不用重新排序
            }
        } finally {
            writeLock.unlock();
        }
    }
212175
public Query<S> query(String filter) throws FetchException {
        synchronized (mStringToQuery) {
            Query<S> query = mStringToQuery.get(filter);
            if (query == null) {
                if (filter == null) {
                    throw new IllegalArgumentException("Query filter must not be null");
                }
                query = query(Filter.filterFor(mType, filter), null);
                mStringToQuery.put(filter, query);
            }
            return query;
        }
    }
822391
public static List<ModelAnnotation> buildAnnotationList(final Element element, final AnnotationFilter filter) {
		final List<ModelAnnotation> annotationList=new ArrayList<>();
		
		forEachAnnotations(element, filter, new AnnotationFoundListener() {

			@Override
			public void onAcceptAnnotation(Element executableMethod, String annotationClassName, Map<String, String> attributes) {
				ModelAnnotation annotation = new ModelAnnotation(annotationClassName, attributes);
				
				annotationList.add(annotation);
			}
		});
		
		return annotationList;
	}
404163
public static nsacl[] get_filtered(nitro_service service, String filter) throws Exception{
		nsacl obj = new nsacl();
		options option = new options();
		option.set_filter(filter);
		nsacl[] response = (nsacl[]) obj.getfiltered(service, option);
		return response;
	}
891703
public static linkset[] get_filtered(nitro_service service, String filter) throws Exception{
		linkset obj = new linkset();
		options option = new options();
		option.set_filter(filter);
		linkset[] response = (linkset[]) obj.getfiltered(service, option);
		return response;
	}
279162
public static <T> List<T> filter(List<T> list, Filter<T> filter) {
		if (null == list || null == filter) {
			return list;
		}
		final List<T> list2 = (list instanceof LinkedList) ? new LinkedList<T>() : new ArrayList<T>(list.size());
		for (T t : list) {
			if (filter.accept(t)) {
				list2.add(t);
			}
		}
		return list2;
	}
1295932
public SimpleJob setFilter(Class<? extends Mapper<Key, Value, Key, Value>> clazz) {
        super.setMapperClass(clazz);
        mapper = true;
        return this;
    }