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

com.tngtech.configbuilder.annotation.propertyloaderconfiguration.PropertySuffixProcessor Maven / Gradle / Ivy

Go to download

The Config Builder creates fully configured instances of config classes, using values from various sources like properties files, command line arguments etc.

There is a newer version: 1.8.1
Show newest version
package com.tngtech.configbuilder.annotation.propertyloaderconfiguration;


import com.tngtech.propertyloader.PropertyLoader;

import java.lang.annotation.Annotation;

public class PropertySuffixProcessor implements PropertyLoaderConfigurationProcessor {

    public void configurePropertyLoader(Annotation annotation, PropertyLoader propertyLoader) {
        propertyLoader.getSuffixes().clear();
        String[] suffixes = ((PropertySuffixes) annotation).extraSuffixes();
        for (String suffix : suffixes) {
            propertyLoader.getSuffixes().addString(suffix);
        }
        if (((PropertySuffixes) annotation).hostNames()) {
            propertyLoader.getSuffixes().addLocalHostNames();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy