Class comparatorClass = null;
try {
comparatorClass = getClass().getClassLoader().loadClass(
getClassName(name));
} catch (ClassNotFoundException e) {
throw new LookupException("Comparator named '" + name
+ "' not found.");
}
if (!Comparator.class.isAssignableFrom(comparatorClass))
throw new LookupException("Class " + comparatorClass.getName()
+ " must implement " + Comparator.class.getName());
return comparatorClass;
}