Why isn't this variable considered to be final? This code does not compile, I would say it is a bug or at least is strange..
public class QualifierConfiguration {
public static final String RANK_CALCULATOR = RankCalculatorImpl.class.getName();
}
public class Implementation{
private final RankCalculator rankCalculator;
public Implementation(@Qualifier(QualifierConfiguration.RANK_CALCULATOR) RankCalculator rankCalculator){
this.rankCalculator = rankCalculator;
}
}
and not even this does not work
public class QualifierConfiguration {
public static final String RANK_CALCULATOR = getValue();
private static String getValue(){
return "string";
}
}