The ClassLoaderFilter has two purposes:
1. Determine if the filter is appropriate for the current runtime environment via the canFilter() method.
2. Determine if a classes from a given classloader can be instrumented.
The second item is really just an instanceof test. This could easily be externalized to the profile properties file. (it would also be nice to allow multiple classloaders). Doing this would mean that new scenarios wouldn't require realizing the ClassLoaderFilter interface.
The first item is just a convenience. It allows you to do a chain of responsibility to determine which classloader filter to use. This is really impractical for two reasons:
1. Stand alone apps generally have profile=on and remote=off while webapps are usually the opposite. So you end up needing two profile properties files anyway.
2. Starting with the StandardClassLoaderFilter doesn't work if you're running JBoss 4.0
So a GenericClassLoaderFilter would hard-code canFilter() to return true.