/** * Decide if the package is a metadata package. */ public boolean isMetaData() { if (isDefaultPackage()) return true; for (int i = 0; i < Constants.METAPACKAGES.length; i++) { if (fqn.startsWith(Constants.METAPACKAGES[i])) return true; } return false; }
/** * Decide if the package is a metadata package. */ public boolean isMetaData() { if (isDefaultPackage()) return true; for (int i = 0; i < Constants.METAPACKAGES.length; i++) { if (fqn.startsWith(Constants.METAPACKAGES[i])) return true; } return false; }
/** * Decide if the package is a metadata package. * * @param pack * @return */ public boolean isMetaData() { if (isDefaultPackage()) return true; for (int i = 0; i < Constants.METAPACKAGES.length; i++) { if (fqn.startsWith(Constants.METAPACKAGES[i])) return true; } return false; }
if (packageRef.isDefaultPackage()) registerActivatorErrorLocation( error("The Bundle Activator is not in the bundle and it is in the default package "), bactivator,
if (packageRef.isDefaultPackage()) registerActivatorErrorLocation( error("The Bundle Activator is not in the bundle and it is in the default package "), bactivator,
if (packageRef.isDefaultPackage()) System.err.println("Duh?"); dot.putResource("OSGI-OPT/src/" + sourcePath, new FileResource(f));
if (packageRef.isDefaultPackage()) System.err.println("Duh?"); dot.putResource("OSGI-OPT/src/" + sourcePath, new FileResource(f));
if (packageRef.isDefaultPackage()) System.err.println("Duh?"); dot.putResource("OSGI-OPT/src/" + sourcePath, new FileResource(f));
if (packageRef.isDefaultPackage()) registerActivatorErrorLocation(error("The Bundle Activator is not in the bundle and it is in the default package "), bactivator, ActivatorErrorType.DEFAULT_PACKAGE);
if (packageRef.isDefaultPackage()) logger.debug("Package reference is default package"); dot.putResource("OSGI-OPT/src/" + sourcePath, new FileResource(f));
if (packageRef.isDefaultPackage()) registerActivatorErrorLocation(error("The Bundle Activator is not in the bundle and it is in the default package "), bactivator, ActivatorErrorType.DEFAULT_PACKAGE);
if (packageRef.isDefaultPackage()) logger.debug("Package reference is default package"); dot.putResource("OSGI-OPT/src/" + sourcePath, new FileResource(f));
/** * Get the packages from the host if this is a fragment bundle * * @return the host packages or an empty set if not a fragment */ public Optional<Set<PackageRef>> getHostPackages() { Entry<String, Attrs> host = getFragmentHost(); if (host != null) { String bsn = host.getKey(); String v = host.getValue() .get(Constants.BUNDLE_VERSION_ATTRIBUTE); Jar jar = findClasspathEntry(bsn, v); if (jar != null) { return Optional.of(jar.getDirectories() .keySet() .stream() .map(this::getPackageRef) .filter(pRef -> !(pRef.isJava() || pRef.isMetaData() || pRef.isDefaultPackage())) .collect(Collectors.toSet())); } warning("Host %s for this fragment cannot be found on the classpath", host); } return Optional.empty(); }
/** * Get the packages from the host if this is a fragment bundle * * @return the host packages or an empty set if not a fragment */ public Optional<Set<PackageRef>> getHostPackages() { Entry<String, Attrs> host = getFragmentHost(); if (host != null) { String bsn = host.getKey(); String v = host.getValue() .get(Constants.BUNDLE_VERSION_ATTRIBUTE); Jar jar = findClasspathEntry(bsn, v); if (jar != null) { return Optional.of(jar.getDirectories() .keySet() .stream() .map(this::getPackageRef) .filter(pRef -> !(pRef.isJava() || pRef.isMetaData() || pRef.isDefaultPackage())) .collect(Collectors.toSet())); } warning("Host %s for this fragment cannot be found on the classpath", host); } return Optional.empty(); }
/** * Decide if the package is a metadata package. * * @param pack * @return */ public boolean isMetaData() { if (isDefaultPackage()) return true; for (int i = 0; i < Constants.METAPACKAGES.length; i++) { if (fqn.startsWith(Constants.METAPACKAGES[i])) return true; } return false; }
/** * Decide if the package is a metadata package. * * @param pack * @return */ public boolean isMetaData() { if (isDefaultPackage()) return true; for (int i = 0; i < Constants.METAPACKAGES.length; i++) { if (fqn.startsWith(Constants.METAPACKAGES[i])) return true; } return false; }
private void verifyActivator() throws Exception { String bactivator = main.get("Bundle-Activator"); if (bactivator != null) { TypeRef ref = analyzer.getTypeRefFromFQN(bactivator); if (analyzer.getClassspace().containsKey(ref)) return; PackageRef packageRef = ref.getPackageRef(); if (packageRef.isDefaultPackage()) error("The Bundle Activator is not in the bundle and it is in the default package "); else if (!analyzer.isImported(packageRef)) { error("Bundle-Activator not found on the bundle class path nor in imports: " + bactivator); } } }