Class FilterConfigWrapper

  • All Implemented Interfaces:
    FilterConfig

    public class FilterConfigWrapper
    extends Object
    implements FilterConfig
    A wrapper around an existing FilterConfig instance. By default it delegates all methods. However, it also allows initialization parameters to be added or overwritten. This can be useful when a sub class of some filter needs to provide hard-coded or calculated initialization parameter values to its parent class. For instance:
    
     public void init(FilterConfig filterConfig) {
         super.init(new FilterConfigWrapper(filterConfig)
                 .withInitParameter("booleanParameter", true)
                 .withInitParameter("intParameter", 100));
     }
     
    Author:
    Rob Spoor