Package aQute.bnd.header

Examples of aQute.bnd.header.Parameters.keySet()


                if (m != null) {
                    Domain domain = Domain.domain(m);
                    Parameters imports = domain.getImportPackage();
                    Parameters exports = domain.getExportPackage();
                    for (String p : exports.keySet()) {
                        if (imports.containsKey(p)) {
                            Attrs attrs = imports.get(p);
                            if (attrs.containsKey(VERSION_ATTRIBUTE)) {
                                exports.get(p).put("imported-as", attrs.get(VERSION_ATTRIBUTE));
                            }
View Full Code Here


        }

        String componentHeader = manifest.getMainAttributes().getValue(Constants.SERVICE_COMPONENT);
        Parameters clauses = new Parameters(componentHeader);
        boolean printed = false;
        for (String path : clauses.keySet()) {
            printed = true;
            out.println(path);

            Resource r = jar.getResource(path);
            if (r != null) {
View Full Code Here

    public static String getBundleSymbolicName(Attributes attribs) {
        Parameters header = new Parameters(attribs.getValue(Constants.BUNDLE_SYMBOLICNAME));
        if (header.size() != 1)
            return null;

        return header.keySet().iterator().next();
    }
   
    public static String getBundleSymbolicName(Class<?> clazz) {
        Bundle bundle = FrameworkUtil.getBundle(clazz);
        if (bundle == null)
View Full Code Here

                logger.logError("Unable to generate access rules from bundle " + c.getFile(), e);
                return;
            }
            Parameters exportPkgs = new Parameters(mf.getMainAttributes().getValue(new Name(Constants.EXPORT_PACKAGE)));
            List<IAccessRule> tmp = new LinkedList<IAccessRule>();
            for (String exportPkg : exportPkgs.keySet()) {
                String pathStr = exportPkg.replace('.', '/') + "/*";
                tmp.add(JavaCore.newAccessRule(new Path(pathStr), IAccessRule.K_ACCESSIBLE));
            }
            addAccessRules(projectAccessRules, c.getProject(), tmp);
        }
View Full Code Here

                if (m != null) {
                    Domain domain = Domain.domain(m);
                    Parameters imports = domain.getImportPackage();
                    Parameters exports = domain.getExportPackage();
                    for (String p : exports.keySet()) {
                        if (imports.containsKey(p)) {
                            Attrs attrs = imports.get(p);
                            if (attrs.containsKey(VERSION_ATTRIBUTE)) {
                                exports.get(p).put("imported-as", attrs.get(VERSION_ATTRIBUTE));
                            }
View Full Code Here

        }

        String componentHeader = manifest.getMainAttributes().getValue(Constants.SERVICE_COMPONENT);
        Parameters clauses = new Parameters(componentHeader);
        boolean printed = false;
        for (String path : clauses.keySet()) {
            printed = true;
            out.println(path);

            Resource r = jar.getResource(path);
            if (r != null) {
View Full Code Here

    public static String getBundleSymbolicName(Attributes attribs) {
        Parameters header = new Parameters(attribs.getValue(Constants.BUNDLE_SYMBOLICNAME));
        if (header.size() != 1)
            return null;

        return header.keySet().iterator().next();
    }

    public static String getBundleSymbolicName(Class< ? > clazz) {
        Bundle bundle = FrameworkUtil.getBundle(clazz);
        if (bundle == null)
View Full Code Here

                logger.logError("Unable to generate access rules from bundle " + c.getFile(), e);
                return;
            }
            Parameters exportPkgs = new Parameters(mf.getMainAttributes().getValue(new Name(Constants.EXPORT_PACKAGE)));
            List<IAccessRule> tmp = new LinkedList<IAccessRule>();
            for (String exportPkg : exportPkgs.keySet()) {
                String pathStr = exportPkg.replace('.', '/') + "/*";
                tmp.add(JavaCore.newAccessRule(new Path(pathStr), IAccessRule.K_ACCESSIBLE));
            }
            addAccessRules(projectAccessRules, c.getProject(), tmp);
        }
View Full Code Here

            try {
                Properties properties = new Properties();
                properties.load(stream);

                Parameters params = new Parameters(properties.getProperty("org.osgi.framework.system.packages", ""));
                for (String packageName : params.keySet()) {
                    CapReqBuilder builder = new CapReqBuilder(PackageNamespace.PACKAGE_NAMESPACE);
                    builder.addAttribute(PackageNamespace.PACKAGE_NAMESPACE, packageName);
                    builder.addAttribute(PackageNamespace.CAPABILITY_VERSION_ATTRIBUTE, new Version(0, 0, 0));
                    Capability cap = builder.setResource(framework).buildCapability();
                    capIndex.addCapability(cap);
View Full Code Here

            try {
                Properties properties = new UTF8Properties();
                properties.load(stream);

                Parameters params = new Parameters(properties.getProperty("org.osgi.framework.system.packages", ""));
                for (String packageName : params.keySet()) {
                    CapReqBuilder builder = new CapReqBuilder(PackageNamespace.PACKAGE_NAMESPACE);
                    builder.addAttribute(PackageNamespace.PACKAGE_NAMESPACE, packageName);
                    builder.addAttribute(PackageNamespace.CAPABILITY_VERSION_ATTRIBUTE, new Version(0, 0, 0));
                    Capability cap = builder.setResource(framework).buildCapability();
                    capIndex.addCapability(cap);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.