return wovenClass.callHooks(); } catch (Throwable t) { ServiceRegistration<?> errorHook = wovenClass.getErrorHook(); Bundle errorBundle = errorHook != null ? errorHook.getReference().getBundle() : manager.getGeneration().getRevision().getBundle(); container.getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, errorBundle, t);
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 ModuleClassLoader classLoader = manager.getClassLoader(); BundleLoader loader = classLoader.getBundleLoader(); // create a woven class object and add it to the thread local stack WovenClassImpl wovenClass = new WovenClassImpl(name, classbytes, entry, classpathEntry, loader, container, blackList); List<WovenClassImpl> wovenClasses = wovenClassStack.get(); if (wovenClasses == null) { wovenClasses = new ArrayList<WovenClassImpl>(6); wovenClassStack.set(wovenClasses); } wovenClasses.add(wovenClass); // call the weaving hooks try { return wovenClass.callHooks(); } catch (Throwable t) { ServiceRegistration<?> errorHook = wovenClass.getErrorHook(); Bundle errorBundle = errorHook != null ? errorHook.getReference().getBundle() : manager.getGeneration().getRevision().getBundle(); container.getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, errorBundle, t); // fail hard with a class loading error ClassFormatError error = new ClassFormatError("Unexpected error from weaving hook."); //$NON-NLS-1$ error.initCause(t); throw error; } }
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 ModuleClassLoader classLoader = manager.getClassLoader(); BundleLoader loader = classLoader.getBundleLoader(); // create a woven class object and add it to the thread local stack WovenClassImpl wovenClass = new WovenClassImpl(name, classbytes, entry, classpathEntry, loader, container, blackList); List<WovenClassImpl> wovenClasses = wovenClassStack.get(); if (wovenClasses == null) { wovenClasses = new ArrayList<WovenClassImpl>(6); wovenClassStack.set(wovenClasses); } wovenClasses.add(wovenClass); // call the weaving hooks try { return wovenClass.callHooks(); } catch (Throwable t) { ServiceRegistration<?> errorHook = wovenClass.getErrorHook(); Bundle errorBundle = errorHook != null ? errorHook.getReference().getBundle() : manager.getGeneration().getRevision().getBundle(); container.getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, errorBundle, t); // fail hard with a class loading error ClassFormatError error = new ClassFormatError("Unexpected error from weaving hook."); //$NON-NLS-1$ error.initCause(t); throw error; } }
return wovenClass.callHooks(); } catch (Throwable t) { ServiceRegistration<?> errorHook = wovenClass.getErrorHook(); Bundle errorBundle = errorHook != null ? errorHook.getReference().getBundle() : manager.getGeneration().getRevision().getBundle(); container.getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, errorBundle, t);
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 ModuleClassLoader classLoader = manager.getClassLoader(); BundleLoader loader = classLoader.getBundleLoader(); // create a woven class object and add it to the thread local stack WovenClassImpl wovenClass = new WovenClassImpl(name, classbytes, entry, classpathEntry, loader, container, blackList); List<WovenClassImpl> wovenClasses = wovenClassStack.get(); if (wovenClasses == null) { wovenClasses = new ArrayList<WovenClassImpl>(6); wovenClassStack.set(wovenClasses); } wovenClasses.add(wovenClass); // call the weaving hooks try { return wovenClass.callHooks(); } catch (Throwable t) { ServiceRegistration<?> errorHook = wovenClass.getErrorHook(); Bundle errorBundle = errorHook != null ? errorHook.getReference().getBundle() : manager.getGeneration().getRevision().getBundle(); container.getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, errorBundle, t); // fail hard with a class loading error ClassFormatError error = new ClassFormatError("Unexpected error from weaving hook."); //$NON-NLS-1$ error.initCause(t); throw error; } }
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 ModuleClassLoader classLoader = manager.getClassLoader(); BundleLoader loader = classLoader.getBundleLoader(); // create a woven class object and add it to the thread local stack WovenClassImpl wovenClass = new WovenClassImpl(name, classbytes, entry, classpathEntry, loader, container, blackList); List<WovenClassImpl> wovenClasses = wovenClassStack.get(); if (wovenClasses == null) { wovenClasses = new ArrayList<WovenClassImpl>(6); wovenClassStack.set(wovenClasses); } wovenClasses.add(wovenClass); // call the weaving hooks try { return wovenClass.callHooks(); } catch (Throwable t) { ServiceRegistration<?> errorHook = wovenClass.getErrorHook(); Bundle errorBundle = errorHook != null ? errorHook.getReference().getBundle() : manager.getGeneration().getRevision().getBundle(); container.getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, errorBundle, t); // fail hard with a class loading error ClassFormatError error = new ClassFormatError("Unexpected error from weaving hook."); //$NON-NLS-1$ error.initCause(t); throw error; } }