if( Uses.class.equals( clazz ) || Service.class.equals( clazz ) )
{
boolean used = false;
if( dependencyDescriptor.injectionType().equals( first( this.descriptor.descriptor().types() )) )
{
ServiceUsage usage;
if( ownerDescriptor instanceof MixinDetailDescriptor )
{
MixinDetailDescriptor mixinDescriptor = (MixinDetailDescriptor) ownerDescriptor;
usage = new ServiceUsage( mixinDescriptor.composite(), descriptorField, mixinDescriptor.composite().module(), mixinDescriptor.composite().module().layer() );
}
else
{
// assume ObjectDetailDescriptor
ObjectDetailDescriptor objectDescriptor = (ObjectDetailDescriptor) ownerDescriptor;
usage = new ServiceUsage( objectDescriptor, descriptorField, objectDescriptor.module(), objectDescriptor.module().layer() );
}
usages.add( usage );
}
}
}