private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) {

        Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null);

        nameDescriptorMap = new LinkedHashMap<String, PropertyDescriptor>();
        descriptorNameMap = new HashMap<PropertyDescriptor, Set<String>>();
        for (PropertyDescriptor descriptor : propertyDescriptors) {
            String name = descriptor.getName();
            if (!name.equals("class")) {
                RelaxedNames relaxedNames = RelaxedNames.forCamelCase(name);
                if (prefixes == null) {
                    for (String relaxedName : relaxedNames) {
                        nameDescriptorMap.put(relaxedName, descriptor);
                        Set<String> names = CollectionUtils.newHashSetOnNull(descriptorNameMap.get(descriptor));
                        names.add(relaxedName);
                        if (!descriptorNameMap.containsKey(descriptor)) {
                            descriptorNameMap.put(descriptor, names);
                        }
                    }
                } else {
                    for (String _prefix : prefixes) {
                        for (String relaxedName : relaxedNames) {
                            String name1 = _prefix + "." + relaxedName;
                            String name2 = _prefix + "_" + relaxedName;
                            nameDescriptorMap.put(name1, descriptor);
                            nameDescriptorMap.put(name2, descriptor);

                            Set<String> names = CollectionUtils.newHashSetOnNull(descriptorNameMap.get(descriptor));
                            names.add(name1);
                            names.add(name2);
                            if (!descriptorNameMap.containsKey(descriptor)) {
                                descriptorNameMap.put(descriptor, names);
                            }
                        }
                    }
                }
            }
        }
    }
@author Robert HG (254963746@qq.com) on 4/20/16.
lts-core/src/main/java/com/github/ltsopensource/autoconfigure/AutoConfigContextBuilder.java