private static void loadVisitorHandlers(HandlerLibrary lib, Trees trees) throws IOException {
		//No, that seemingly superfluous reference to JavacASTVisitor's classloader is not in fact superfluous!
		for (JavacASTVisitor visitor : SpiLoadUtil.findServices(JavacASTVisitor.class, JavacASTVisitor.class.getClassLoader())) {
			visitor.setTrees(trees);
			lib.visitorHandlers.add(new VisitorContainer(visitor));
		}
	}
private static void loadVisitorHandlers ( HandlerLibrary lib , Trees trees ) throws IOException { for ( JavacASTVisitor visitor : SpiLoadUtil . findServices ( JavacASTVisitor . class , JavacASTVisitor . class . getClassLoader ( ) ) ) { visitor . setTrees ( trees ) ; lib . visitorHandlers . add ( new VisitorContainer ( visitor ) ) ; } }
Uses SPI Discovery to find implementations of {@link JavacASTVisitor}.