retval = new ResultFilteringEnumeration( enum, searchControls, ctx ); retval.addResultFilter( new SearchResultFilter() { public boolean accept( LdapContext ctx, DbSearchResult result, SearchControls controls ) throws NamingException
retval = new ResultFilteringEnumeration( enum, searchControls, ctx, new SearchResultFilter()
    protected void search( Name base, Map env, ExprNode filter,                           SearchControls searchControls )            throws NamingException    {        Invocation invocation = getInvocation();        if ( invocation.getState() == InvocationStateEnum.POSTINVOCATION )        {            if ( searchControls.getReturningAttributes() != null )            {                return;            }            SearchResultEnumeration enum ;            ResultFilteringEnumeration retval;            LdapContext ctx = ( LdapContext ) invocation.getContextStack().peek();            enum = ( SearchResultEnumeration ) invocation.getReturnValue();            retval = new ResultFilteringEnumeration( enum, searchControls, ctx );            retval.addResultFilter( new SearchResultFilter()            {                public boolean accept( LdapContext ctx, DbSearchResult result,                                       SearchControls controls )                        throws NamingException                {                    return FilterServiceImpl.this.accept( ctx, result, controls );                }            } );            invocation.setReturnValue( retval );        }    }