public BundleClassFinder(PackageAdmin packageAdmin, Bundle bundle, ClassDiscoveryFilter discoveryFilter) { this.packageAdmin = packageAdmin; this.bundle = BundleUtils.unwrapBundle(bundle); this.discoveryFilter = discoveryFilter; }
public TransformerWrapper(ClassTransformer classTransformer, Bundle bundle) { this.classTransformer = classTransformer; this.bundle = BundleUtils.unwrapBundle(bundle); }
public TransformerWrapper(ClassTransformer classTransformer, Bundle bundle) { this.classTransformer = classTransformer; this.bundle = BundleUtils.unwrapBundle(bundle); }
/** * Set up a BundleResourceFinder * The suffix may contain a path fragment, unlike the bundle.findEntries method. * * @param packageAdmin package admin for finding fragments * @param bundle bundle to search * @param prefix search only paths and zip files starting with this prefix * @param suffix return only entries ending in this suffix. * @param discoveryFilter filter for matching directories and zip files. */ public BundleResourceFinder(PackageAdmin packageAdmin, Bundle bundle, String prefix, String suffix, ResourceDiscoveryFilter discoveryFilter) { this.packageAdmin = packageAdmin; this.bundle = BundleUtils.unwrapBundle(bundle); this.prefix = addSlash(prefix.trim()); this.suffix = suffix.trim(); int pos = this.suffix.lastIndexOf("/"); if (pos > -1) { osgiSuffix = this.suffix.substring(pos + 1, this.suffix.length()); extendedMatching = true; } else { osgiSuffix = "*" + this.suffix; extendedMatching = false; } this.discoveryFilter = discoveryFilter; }
public BundleAnnotationFinder(PackageAdmin packageAdmin, Bundle bundle, ResourceDiscoveryFilter discoveryFilter, Set<String> paths) throws Exception { this.bundle = BundleUtils.unwrapBundle(bundle); BundleResourceFinder bundleResourceFinder = new BundleResourceFinder(packageAdmin, this.bundle, "", ".class", discoveryFilter); bundleResourceFinder.find(new AnnotationFindingCallback()); this.paths = paths; }
public BundleAnnotationFinder(PackageAdmin packageAdmin, Bundle bundle, ResourceDiscoveryFilter discoveryFilter, Set<String> paths) throws Exception { this.bundle = BundleUtils.unwrapBundle(bundle); BundleResourceFinder bundleResourceFinder = new BundleResourceFinder(packageAdmin, this.bundle, "", ".class", discoveryFilter); bundleResourceFinder.find(new AnnotationFindingCallback()); this.paths = paths; }
public BundleAnnotationFinder(PackageAdmin packageAdmin, Bundle bundle, ResourceDiscoveryFilter discoveryFilter, Set<String> paths) throws Exception { this.bundle = BundleUtils.unwrapBundle(bundle); BundleResourceFinder bundleResourceFinder = new BundleResourceFinder(packageAdmin, this.bundle, "", ".class", discoveryFilter); bundleResourceFinder.find(new AnnotationFindingCallback()); this.paths = paths; }
@ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader, @ParamSpecial(type = SpecialAttributeType.abstractName) AbstractName abName) { this.bundle = BundleUtils.unwrapBundle(bundle); this.facesConfigData = facesConfigData; this.classLoader = classLoader;
public WaitForBlueprintGBean(@ParamSpecial(type = SpecialAttributeType.bundleContext) BundleContext bundleContext, @ParamAttribute(name = "packageName") String packageName, @ParamAttribute(name = "symbolicName") String symbolicName) throws Exception { final Bundle bundle = BundleUtils.unwrapBundle(getBundle(bundleContext, symbolicName, packageName)); BlueprintListener listener = new BlueprintListener() { @Override public void blueprintEvent(BlueprintEvent event) { if (event.getBundle() == bundle) { if (event.getType() == BlueprintEvent.CREATED || event.getType() == BlueprintEvent.FAILURE) { WaitForBlueprintGBean.this.event = event; latch.countDown(); } } } }; ServiceRegistration registration = bundleContext.registerService(BlueprintListener.class.getName(), listener, new Hashtable()); latch.await(); registration.unregister(); if (event.getType() == BlueprintEvent.FAILURE) { throw new Exception("Could not start blueprint plan", event.getCause()); } }