public static < S extends Storable > Filter < S > filterFor ( Class < S > type , String expression ) { SoftValuedCache < Object , Filter < S > > filterCache = getFilterCache ( type ) ; synchronized ( filterCache ) { Filter < S > filter = filterCache . get ( expression ) ; if ( filter == null ) { filter = new FilterParser < S > ( type , expression ) . parseRoot ( ) ; filterCache . put ( expression , filter ) ; } return filter ; } }
Returns a cached filter instance that operates on the given type and filter expression .