code: protected static Interceptor createInterceptor( InterceptorConfig config, Class baseClassOrInterface )
      {
          assert Interceptor.class.isAssignableFrom( baseClassOrInterface )
                  : baseClassOrInterface.getName() + " cannot be assigned to " + Interceptor.class.getName();
          
          ClassLoader cl = DiscoveryUtils.getClassLoader();
          String className = config.getInterceptorClass();
          
          try
          {
              Class interceptorClass = cl.loadClass( className );
              
              if ( ! baseClassOrInterface.isAssignableFrom( interceptorClass ) )
              {
                  _log.error( "Interceptor " + interceptorClass.getName() + " does not implement or extend "
                              + baseClassOrInterface.getName() );
                  return null;
              }
              
              Interceptor interceptor = ( Interceptor ) interceptorClass.newInstance();
              interceptor.init( config );
              return interceptor;
          }
          catch ( ClassNotFoundException e )
          {
              _log.error( "Could not find interceptor class " + className, e );
          }
          catch ( InstantiationException e )
          {
              _log.error( "Could not instantiate interceptor class " + className, e );
          }
          catch ( IllegalAccessException e )
          {
              _log.error( "Could not instantiate interceptor class " + className, e );
          }
          
          return null;
      }
docs: Instantiates an interceptor using the class name in the given InterceptorConfig.
  
  @param config the {@link InterceptorConfig} used to determine the {@link Interceptor} class.
  @param baseClassOrInterface the required base class or interface.  May be <code>null</code>.
  @return an initialized Interceptor, or <code>null</code> if an error occurred.