ClassLoaderScanner scanner = new ClassLoaderScanner();
scanner.setDirectoryResourceName(this.resourceName);
for (Pattern pattern : patterns) scanner.addInclusion(pattern);
ClassLoaderClassGroup group = scanner.getClasses(GroovyDSL.class, Object.class);
List<GroovyDSL> groovyDSLs = group.getInstances(GroovyDSL.class);
for (Class categoryClass : group.getClasses(Object.class)) {
groovyDSLs.add( new GroovyDSLCategoryClass(categoryClass) );
}
this.initialize(groovyDSLs);