Package com.buschmais.jqassistant.plugin.java.api.model

Examples of com.buschmais.jqassistant.plugin.java.api.model.ManifestSectionDescriptor


    @Override
    public Iterable<? extends FileDescriptor> scan(InputStream item, String path, Scope scope, Scanner scanner) throws IOException {
        Manifest manifest = new Manifest(item);
        Store store = getStore();
        ManifestFileDescriptor manifestFileDescriptor = store.create(ManifestFileDescriptor.class);
        ManifestSectionDescriptor mainSectionDescriptor = store.create(ManifestSectionDescriptor.class);
        mainSectionDescriptor.setName(SECTION_MAIN);
        manifestFileDescriptor.setMainSection(mainSectionDescriptor);
        readSection(manifest.getMainAttributes(), mainSectionDescriptor, store);
        for (Map.Entry<String, Attributes> sectionEntry : manifest.getEntries().entrySet()) {
            ManifestSectionDescriptor sectionDescriptor = store.create(ManifestSectionDescriptor.class);
            sectionDescriptor.setName(sectionEntry.getKey());
            readSection(sectionEntry.getValue(), sectionDescriptor, store);
            manifestFileDescriptor.getManifestSections().add(sectionDescriptor);
        }
        manifestFileDescriptor.setFileName(path);
        return asList(manifestFileDescriptor);
View Full Code Here

TOP

Related Classes of com.buschmais.jqassistant.plugin.java.api.model.ManifestSectionDescriptor

Copyright © 2018 www.massapicom. 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.