thinking more about that, maybe we can try string comparison before bothering with class loader.  If clazz.getSimpleName() already match an entry in the filterClasses, then return true.

Since BatchEnvironment already has a method to obtain appropriate classloader, I think we should use BatchEnvironment.getClassLoader() first, and this is expected to return a non-null class loader.  We can add a ClassLoader param to these matches(...) methods and the callers can get such cloass loader from job context.

If that fails, fall back to clazz.getClassLoader().  WDYT?