public List<ZuulFilter> getFiltersByType(FilterType filterType) {

        List<ZuulFilter> list = hashFiltersByType.get(filterType);
        if (list != null) return list;

        list = new ArrayList<ZuulFilter>();

        Collection<ZuulFilter> filters = filterRegistry.getAllFilters();
        for (Iterator<ZuulFilter> iterator = filters.iterator(); iterator.hasNext(); ) {
            ZuulFilter filter = iterator.next();
            if (filter.filterType().equals(filterType)) {
                list.add(filter);
            }
        }

        // Sort by filterOrder.
        Collections.sort(list, new Comparator<ZuulFilter>() {
            @Override
            public int compare(ZuulFilter o1, ZuulFilter o2) {
                return o1.filterOrder() - o2.filterOrder();
            }
        });

        hashFiltersByType.putIfAbsent(filterType, list);
        return list;
    }
public List < ZuulFilter > getFiltersByType ( FilterType filterType ) { List < ZuulFilter > list = hashFiltersByType . get ( filterType ) ; if ( list != null ) return list ; list = new ArrayList < ZuulFilter > ( ) ; Collection < ZuulFilter > filters = filterRegistry . getAllFilters ( ) ; for ( Iterator < ZuulFilter > iterator = filters . iterator ( ) ; iterator . hasNext ( ) ; ) { ZuulFilter filter = iterator . next ( ) ; if ( filter . filterType ( ) . equals ( filterType ) ) { list . add ( filter ) ; } } Collections . sort ( list , new Comparator < ZuulFilter > ( ) { @ Override public int compare ( ZuulFilter o1 , ZuulFilter o2 ) { return o1 . filterOrder ( ) - o2 . filterOrder ( ) ; } } ) ; hashFiltersByType . putIfAbsent ( filterType , list ) ; return list ; }
Returns a list of filters by the filterType specified

@param filterType
@return a List<ZuulFilter>