code: public static ContextFilter createContextFilter(Config config) {
      // For now always return an accept-all context filter.
      if (config.hasPath(CONTEXT_FILTER_CLASS)) {
        try {
          return ContextFilter.class.cast(
              ConstructorUtils.invokeConstructor(Class.forName(config.getString(CONTEXT_FILTER_CLASS)), config));
        } catch (ReflectiveOperationException rfe) {
          log.error("Failed to instantiate context filter with class " + config.getString(CONTEXT_FILTER_CLASS), rfe);
        }
      }
      return new AllContextFilter();
    }
docs: Create a {@link ContextFilter} from a {@link Config}.
  @param config {@link Config} used for creating new {@link ContextFilter}.
  @return a new {@link ContextFilter}.