All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buschmais.jqassistant.scm.maven.configuration.source.MavenPropertiesConfigSource Maven / Gradle / Ivy

Go to download

jQAssistant plugin for Apache Maven to integrate jQAssistant into a Maven based project.

The newest version!
package com.buschmais.jqassistant.scm.maven.configuration.source;

import java.util.Properties;
import java.util.Set;

import io.smallrye.config.common.AbstractConfigSource;

/**
 * Config source for properties provided by Maven.
 */
public class MavenPropertiesConfigSource extends AbstractConfigSource {

    public static final int CONFIGURATION_ORDINAL_MAVEN_PROPERTIES = 90;

    private Properties properties;

    public MavenPropertiesConfigSource(Properties properties, String name) {
        super(name, CONFIGURATION_ORDINAL_MAVEN_PROPERTIES);
        this.properties = properties;
    }

    @Override
    public Set getPropertyNames() {
        return properties.stringPropertyNames();
    }

    @Override
    public String getValue(String key) {
        return properties.getProperty(key);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy