@ Check ( CheckType . NORMAL ) public void checkMultipleCapacityUses ( SarlCapacityUses uses ) { if ( ! isIgnored ( REDUNDANT_CAPACITY_USE ) ) { final XtendTypeDeclaration declaringType = uses . getDeclaringType ( ) ; if ( declaringType != null ) { final Set < String > previousCapacityUses = doGetPreviousCapacities ( uses , declaringType . getMembers ( ) . iterator ( ) ) ; int index = 0 ; for ( final JvmTypeReference capacity : uses . getCapacities ( ) ) { if ( previousCapacityUses . contains ( capacity . getIdentifier ( ) ) ) { addIssue ( MessageFormat . format ( Messages . SARLValidator_79 , capacity . getSimpleName ( ) ) , uses , SARL_CAPACITY_USES__CAPACITIES , index , REDUNDANT_CAPACITY_USE , capacity . getSimpleName ( ) ) ; } else { previousCapacityUses . add ( capacity . getIdentifier ( ) ) ; } ++ index ; } } } }
Check for multiple capacity use declaration .