return filter;
}
private FilterKey createFilterKey(FilterDef def, Object instance) {
FilterKey key = null;
if ( !cacheInstance( def.getCacheMode() ) ) {
return key; // if the filter is not cached there is no key!
}
if ( def.getKeyMethod() == null ) {
key = new FilterKey() {
@Override
public int hashCode() {
return getImpl().hashCode();
}
@Override
public boolean equals(Object obj) {
if ( !( obj instanceof FilterKey ) ) {
return false;
}
FilterKey that = (FilterKey) obj;
return this.getImpl().equals( that.getImpl() );
}
};
}
else {
try {