in spring-utils/src/main/java/org/apache/archiva/redback/components/springutils/ComponentContainer.java [97:110]
public <T> T getComponent( Class<T> clazz, String hint )
{
Map<String, T> beansOfType = buildMapWithRole( clazz );
if ( beansOfType == null || beansOfType.isEmpty() )
{
throw new RuntimeException( "no beans of Type " + clazz.getName() );
}
T bean = beansOfType.get( hint );
if ( bean == null )
{
throw new RuntimeException( "no beans of Type " + clazz.getName() + " with hint " + hint );
}
return bean;
}