public static BoostStrategy getDynamicBoost(final XAnnotatedElement element) {
if ( element == null ) {
return DefaultBoostStrategy.INSTANCE;
}
DynamicBoost boostAnnotation = element.getAnnotation( DynamicBoost.class );
if ( boostAnnotation == null ) {
return DefaultBoostStrategy.INSTANCE;
}
Class<? extends BoostStrategy> boostStrategyClass = boostAnnotation.impl();
return ClassLoaderHelper.instanceFromClass( BoostStrategy.class, boostStrategyClass, "boost strategy" );
}