code: private static AtomixConfig config(ClassLoader classLoader, List<File> files, AtomixRegistry registry) {
      ConfigMapper mapper = new PolymorphicConfigMapper(
          classLoader,
          registry,
          new PolymorphicTypeMapper("type", PartitionGroupConfig.class, PartitionGroup.Type.class),
          new PolymorphicTypeMapper("type", PrimitiveConfig.class, PrimitiveType.class),
          new PolymorphicTypeMapper(null, PrimitiveConfig.class, PrimitiveType.class),
          new PolymorphicTypeMapper("type", PrimitiveProtocolConfig.class, PrimitiveProtocol.Type.class),
          new PolymorphicTypeMapper("type", ProfileConfig.class, Profile.Type.class),
          new PolymorphicTypeMapper("type", NodeDiscoveryConfig.class, NodeDiscoveryProvider.Type.class),
          new PolymorphicTypeMapper("type", GroupMembershipProtocolConfig.class, GroupMembershipProtocol.Type.class));
      return mapper.loadFiles(AtomixConfig.class, files, Lists.newArrayList(RESOURCES));
    }
docs: Returns a new Atomix configuration from the given resources.
  
  @param classLoader the class loader
  @param files the files to load
  @param registry the Atomix registry from which to map types
  @return a new Atomix configuration from the given resource