Package com.buschmais.jqassistant.plugin.java.impl.store.descriptor

Examples of com.buschmais.jqassistant.plugin.java.impl.store.descriptor.ManifestFileDescriptor


    }

    @Override
    public ManifestFileDescriptor scanFile(Store store, StreamSource streamSource) throws IOException {
        Manifest manifest = new Manifest(streamSource.getInputStream());
        ManifestFileDescriptor manifestFileDescriptor = store.create(ManifestFileDescriptor.class);
        manifestFileDescriptor.setFileName(streamSource.getSystemId());
        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);
        }
        return manifestFileDescriptor;
    }
View Full Code Here

TOP

Related Classes of com.buschmais.jqassistant.plugin.java.impl.store.descriptor.ManifestFileDescriptor

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.