public byte[] processClass(String name, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager) {
ServiceRegistry registry = getRegistry();
if (registry == null)
return null; // no registry somehow we are loading classes before the registry has been created
ClassLoaderDelegate delegate = manager.getBaseClassLoader().getDelegate();
BundleLoader loader;
if (delegate instanceof BundleLoader) {
loader = (BundleLoader) delegate;
} else {
Throwable e = new IllegalStateException("Could not obtain loader"); //$NON-NLS-1$