public void weave(WovenClass wovenClass) {
        try {
            BundleWiring bundleWiring = wovenClass.getBundleWiring();
            Bundle bundle = bundleWiring.getBundle();
            synchronized (extendedBundles) {
                if (extendedBundles.contains(bundle.getBundleId())) {
                    // Nothing to do
                    return;
                }
                extendedBundles.add(bundle.getBundleId());
            }
            LOGGER.debug("considering to add imports via weaving for bundle {} ",bundle.getSymbolicName());
            ExtendedBundle extendedBundle = new ExtendedBundle(extendedBundleContext, bundle);
            if (extendedBundle.isRelevantForImportEnhancements()) {
                LOGGER.debug("Enhance DynamicImports of bundle {}...", bundle.getSymbolicName());
                wovenClass.getDynamicImports().addAll(ADDITIONAL_IMPORTS);
            }
        } catch (RuntimeException e) {
            LOGGER.warn("RuntimeException while trying to extend bundle imports");
        }

    }
public void weave ( WovenClass wovenClass ) { try { BundleWiring bundleWiring = wovenClass . getBundleWiring ( ) ; Bundle bundle = bundleWiring . getBundle ( ) ; synchronized ( extendedBundles ) { if ( extendedBundles . contains ( bundle . getBundleId ( ) ) ) { return ; } extendedBundles . add ( bundle . getBundleId ( ) ) ; } LOGGER . debug ( "considering to add imports via weaving for bundle {} " , bundle . getSymbolicName ( ) ) ; ExtendedBundle extendedBundle = new ExtendedBundle ( extendedBundleContext , bundle ) ; if ( extendedBundle . isRelevantForImportEnhancements ( ) ) { LOGGER . debug ( "Enhance DynamicImports of bundle {}..." , bundle . getSymbolicName ( ) ) ; wovenClass . getDynamicImports ( ) . addAll ( ADDITIONAL_IMPORTS ) ; } } catch ( RuntimeException e ) { LOGGER . warn ( "RuntimeException while trying to extend bundle imports" ) ; } }
{@inheritDoc}