public PlaceholderResolverStrategy getStrategy(Object object) { for (PlaceholderResolverStrategy strategy : strategiesList) { if (strategy.accept(object)) { return strategy; } } throw new RuntimeException( "Unable to info PlaceholderResolverStrategy for class : " + object.getClass() + " object : " + object); }
public void addStrategy(PlaceholderResolverStrategy strategy) { strategy.setIndex(this.strategiesList.size()); this.strategiesList.add(strategy); }