private Collection<? extends TraceSetting> normalize(
Collection<? extends TraceSetting> settings) throws RewriteException {
ClassLoader loader = getEnvironment().getServiceClassLoader();
List<TraceSetting> results = new ArrayList<TraceSetting>();
for (TraceSetting setting : settings) {
Tracepoint orig = setting.getTracepoint();
Class<?> operatorClass;
try {
operatorClass = loader.loadClass(orig.getOperatorClassName());
} catch (ClassNotFoundException e) {
throw new RewriteException(MessageFormat.format(
Messages.getString("TracepointWeaveRewriter.errorLoadOperatorClass"), //$NON-NLS-1$
orig.getOperatorClassName()), e);
}
Tracepoint normalized = createTracepoint(
operatorClass, orig.getOperatorMethodName(),
orig.getPortKind(), orig.getPortName());
results.add(new TraceSetting(normalized, setting.getMode(), setting.getAttributes()));
}
return results;