_out.println("Command line specified processor: " + pi); //$NON-NLS-1$
}
return pi;
} catch (Exception e) {
// TODO: better error handling
throw new AbortCompilation(null, e);
}
}
return null;
}
// if no processors were explicitly specified with setProcessors()
// or the command line, search the processor path with ServiceLoader.
if (null == _serviceLoader ) {
_serviceLoader = ServiceLoader.load(Processor.class, _procLoader);
_serviceLoaderIter = _serviceLoader.iterator();
}
try {
if (_serviceLoaderIter.hasNext()) {
Processor p = _serviceLoaderIter.next();
p.init(_processingEnv);
ProcessorInfo pi = new ProcessorInfo(p);
_processors.add(pi);
if (_printProcessorDiscovery && null != _out) {
StringBuilder sb = new StringBuilder();
sb.append("Discovered processor service "); //$NON-NLS-1$
sb.append(pi);
sb.append("\n supporting "); //$NON-NLS-1$
sb.append(pi.getSupportedAnnotationTypesAsString());
sb.append("\n in "); //$NON-NLS-1$
sb.append(getProcessorLocation(p));
_out.println(sb.toString());
}
return pi;
}
} catch (ServiceConfigurationError e) {
// TODO: better error handling
throw new AbortCompilation(null, e);
}
return null;
}