@SuppressWarnings("unchecked")
  public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map interceptorRefParams)
      throws ConfigurationException {
    // Ensure the interceptor class is present.
    Class<? extends Interceptor> interceptorClass;
    try {
      interceptorClass =
          (Class<? extends Interceptor>) getClassInstance(interceptorConfig.getClassName());
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }

    ProvidedInterceptor providedInterceptor =
        new ProvidedInterceptor(interceptorConfig, interceptorRefParams, interceptorClass);
    interceptors.add(providedInterceptor);
    return providedInterceptor;
  }
 protected void embalmTarget() {
   target.params = Collections.unmodifiableMap(target.params);
 }
 public Builder location(Location loc) {
   target.location = loc;
   return this;
 }
 public Builder className(String name) {
   target.className = name;
   return this;
 }
 public Builder name(String name) {
   target.name = name;
   return this;
 }