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

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


        return !isDirectory && file.endsWith(".properties");
    }

    @Override
    public PropertyFileDescriptor scanFile(Store store, StreamSource streamSource) throws IOException {
        PropertyFileDescriptor propertyFileDescriptor = store.create(PropertyFileDescriptor.class);
        String filename = streamSource.getSystemId();
        propertyFileDescriptor.setFileName(filename);
        Properties properties = new Properties();
        properties.load(streamSource.getInputStream());
        for (String name : properties.stringPropertyNames()) {
            String value = properties.getProperty(name);
            PropertyDescriptor propertyDescriptor = store.create(PropertyDescriptor.class);
            propertyDescriptor.setName(name);
            propertyDescriptor.setValue(value);
            propertyFileDescriptor.getProperties().add(propertyDescriptor);
        }
        return propertyFileDescriptor;
    }
View Full Code Here

TOP

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

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.