{
String key = requirement.getRequirementKey();
value = container.lookup( key );
ComponentDescriptor componentDescriptor = container.getComponentDescriptor( key );
retValue = Collections.singletonList( componentDescriptor );
}
else if ( SINGLE_MAPPING_TYPE.equals( mappingType ) )
{
String key = requirement.getRequirementKey();
value = container.lookup( key );
ComponentDescriptor componentDescriptor = container.getComponentDescriptor( key );
retValue = Collections.singletonList( componentDescriptor );
}
else if ( MAP_MAPPING_TYPE.equals( mappingType ) )
{
value = container.lookupMap( role );
retValue = container.getComponentDescriptorList( role );
}
else if ( SET_MAPPING_TYPE.equals( mappingType ) )
{
value = new HashSet( container.lookupList( role ) );
retValue = container.getComponentDescriptorList( role );
}
else
{
String key = requirement.getRequirementKey();
value = container.lookup( key );
ComponentDescriptor componentDescriptor = container.getComponentDescriptor( key );
retValue = Collections.singletonList( componentDescriptor );
}
component.addComponentRequirement( requirement, value );