enhancer.getPrecedence() });
droneEnhancementEvent.fire(new BeforeDroneEnhanced(enhancer, browser, type, qualifier));
Object newBrowser = enhancer.enhance(browser.asInstance(type), qualifier);
browser.set(newBrowser);
droneEnhancementEvent.fire(new AfterDroneEnhanced(browser, type, qualifier));
}
}
else if (candidate instanceof Enhancer) {
Enhancer enhancer = (Enhancer) candidate;
if (enhancer.canEnhance(type, qualifier)) {
log.log(Level.WARNING,
"Deprecated Enhancer type, please implement DroneInstanceEnhancer instead. Enhancing {0} @{1} using enhancer {2} with precedence {3}",
new Object[] { type.getSimpleName(), qualifier.getSimpleName(), enhancer.getClass().getName(),
enhancer.getPrecedence() });
droneEnhancementEvent.fire(new BeforeDroneEnhanced(new DeprecatedEnhancerWrap(enhancer), browser, type,
qualifier));
Object newBrowser = enhancer.enhance(browser.asInstance(type), qualifier);
browser.set(newBrowser);
droneEnhancementEvent.fire(new AfterDroneEnhanced(browser, type, qualifier));
}
}
}
}