ClassPath[] oldPaths = paths.getAndSet(newPaths);
if (oldPaths != null) {
registry.unregister(type, oldPaths);
}
if (newPaths != null) {
registry.register(type, newPaths);
}
}
public void register() {
ClassPath[] newPaths = new ClassPath[]{cpProvider.getClassPaths(type)};