private ConfigurationValueExtractor getValueExtractor(Field field) {
Collection<ConfigurationValueExtractor> candidates = new HashSet<ConfigurationValueExtractor>();
ConfigurationBootstrap bootstrap = Beans.getReference(ConfigurationBootstrap.class);
for (Class<? extends ConfigurationValueExtractor> extractorClass : bootstrap.getCache()) {
ConfigurationValueExtractor extractor = Beans.getReference(extractorClass);
if (extractor.isSupported(field)) {
candidates.add(extractor);
}
}
ConfigurationValueExtractor elected = StrategySelector.selectInstance(ConfigurationValueExtractor.class,
candidates);
if (elected == null) {
throw new ConfigurationException(getBundle().getString("configuration-extractor-not-found",
field.toGenericString(), ConfigurationValueExtractor.class.getName()), new ClassNotFoundException());