public LoadMappingsResult load(List<String> mappingFiles, List<MappingFileData> builderMappings) {
List<MappingFileData> mappingFileDataList = loadFromFiles(mappingFiles);
mappingFileDataList.addAll(builderMappings);
Configuration globalConfiguration = findConfiguration(mappingFileDataList);
ClassMappings customMappings = new ClassMappings();
// Decorate the raw ClassMap objects and create ClassMap "prime" instances
for (MappingFileData mappingFileData : mappingFileDataList) {
List<ClassMap> classMaps = mappingFileData.getClassMaps();
ClassMappings customMappingsPrime = mappingsParser.processMappings(classMaps, globalConfiguration);
customMappings.addAll(customMappingsPrime);
}
// Add default mappings using matching property names if wildcard policy
// is true. The addDefaultFieldMappings will check the wildcard policy of each classmap
ClassMapBuilder.addDefaultFieldMappings(customMappings, globalConfiguration);
Set<CustomConverterDescription> customConverterDescriptions = new LinkedHashSet<CustomConverterDescription>();
// build up custom converter description objects
if (globalConfiguration.getCustomConverters() != null && globalConfiguration.getCustomConverters().getConverters() != null) {
for (CustomConverterDescription cc : globalConfiguration.getCustomConverters().getConverters()) {
customConverterDescriptions.add(cc);
}
}
// iterate through the classmaps and set all of the customconverters on them