class EnvironmentPropertySource extends BasePropertySource {

    @Override
    public PropertyValue get(String key) {
        if (isDisabled()) {
            return null;
        }
        // Exact match (i.e. com.ACME.getNumChilds)
        String effectiveKey = hasPrefix() ? getPrefix() + "." + key
                : key;
        String value = getPropertiesProvider().getenv(effectiveKey);
        // Replace all . by _ (i.e. com_ACME_size)
        if(value==null){
            effectiveKey = effectiveKey.replaceAll("\\W", "_");
            value = getPropertiesProvider().getenv(effectiveKey);
        }
        // Replace all . by _ and convert to upper case (i.e. COM_ACME_SIZE)
        if(value==null){
            effectiveKey = effectiveKey.toUpperCase();
            value = getPropertiesProvider().getenv(effectiveKey);
        }
        if(value==null){
            return null;
        }
        return PropertyValue.createValue(key, value).setMeta("source", getName());
    }

    public  EnvironmentPropertySource();
    public  EnvironmentPropertySource(int ordinal);
    public  EnvironmentPropertySource(String prefix, int ordinal);
    public  EnvironmentPropertySource(String prefix);

}