Search in sources :

Example 1 with ICollectionFilter

use of com.google.security.zynamics.zylib.types.common.ICollectionFilter in project binnavi by google.

the class CFunctionFilterComponent method createFilter.

@Override
public IFilter<INaviView> createFilter() {
    return new IFilter<INaviView>() {

        @Override
        public boolean checkCondition(final INaviView element) {
            final CFunctionTypePanel typePanel = dialog.getFunctionTypePanel();
            final INaviFunction function = module.getFunction(element);
            return ((typePanel.isShowAdjustorFunctions() && (function.getType() == FunctionType.ADJUSTOR_THUNK)) || (typePanel.isShowImportedFunctions() && (function.getType() == FunctionType.IMPORT)) || (typePanel.isShowLibraryFunctions() && (function.getType() == FunctionType.LIBRARY)) || (typePanel.isShowNormalFunctions() && (function.getType() == FunctionType.NORMAL)) || (typePanel.isShowThunkFunctions() && (function.getType() == FunctionType.THUNK)));
        }

        @Override
        public IFilledList<INaviView> get(final List<INaviView> elements) {
            return new FilledList<INaviView>(CollectionHelpers.filter(elements, new ICollectionFilter<INaviView>() {

                @Override
                public boolean qualifies(final INaviView item) {
                    return checkCondition(item);
                }
            }));
        }
    };
}
Also used : INaviView(com.google.security.zynamics.binnavi.disassembly.views.INaviView) IFilter(com.google.security.zynamics.binnavi.Gui.FilterPanel.IFilter) FilledList(com.google.security.zynamics.zylib.types.lists.FilledList) IFilledList(com.google.security.zynamics.zylib.types.lists.IFilledList) ICollectionFilter(com.google.security.zynamics.zylib.types.common.ICollectionFilter) FilledList(com.google.security.zynamics.zylib.types.lists.FilledList) IFilledList(com.google.security.zynamics.zylib.types.lists.IFilledList) List(java.util.List) INaviFunction(com.google.security.zynamics.binnavi.disassembly.INaviFunction)

Aggregations

IFilter (com.google.security.zynamics.binnavi.Gui.FilterPanel.IFilter)1 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)1 INaviView (com.google.security.zynamics.binnavi.disassembly.views.INaviView)1 ICollectionFilter (com.google.security.zynamics.zylib.types.common.ICollectionFilter)1 FilledList (com.google.security.zynamics.zylib.types.lists.FilledList)1 IFilledList (com.google.security.zynamics.zylib.types.lists.IFilledList)1 List (java.util.List)1