public Config getSubconfig()

in src/main/java/com/amazonaws/secretsmanager/util/Config.java [141:161]


    public Config getSubconfig(String subprefix) {
        Enumeration<String> propertyNames = (Enumeration<String>) config.propertyNames();
        Properties subconfig = null;
        while (propertyNames.hasMoreElements()) {
            String name = propertyNames.nextElement();
            if (isSubproperty(name, subprefix)) {
                if (subconfig == null) {
                    subconfig = new Properties();
                }
                String subpropertyName = getSubproperty(name, subprefix);
                subconfig.setProperty(subpropertyName, config.getProperty(name));
            }
        }
        if (subconfig == null) {
            return null;
        } else if (prefix != null) {
            return new Config(prefix + "." + subprefix, subconfig);
        } else {
            return new Config(subprefix, subconfig);
        }
    }