Package: KopfundZahlDefaultStrategyFactoryProvider
KopfundZahlDefaultStrategyFactoryProvider
| name | instruction | branch | complexity | line | method | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| KopfundZahlDefaultStrategyFactoryProvider() | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| getStrategyFactories() | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
Coverage
1: package de.fhdw.gaming.ipspiel22.kopfundzahl.domain.factory;
2: 
3: import java.util.ArrayList;
4: import java.util.List;
5: import java.util.ServiceLoader;
6: 
7: /**
8:  * Implements {@link KopfundZahlStrategyFactoryProvider} by using the {@link ServiceLoader}.
9:  */
10: public final class KopfundZahlDefaultStrategyFactoryProvider implements KopfundZahlStrategyFactoryProvider {
11: 
12:     @Override
13:     public List<KopfundZahlStrategyFactory> getStrategyFactories() {
14:         final ServiceLoader<KopfundZahlStrategyFactory> services = ServiceLoader.load(KopfundZahlStrategyFactory.class);
15:         final List<KopfundZahlStrategyFactory> list = new ArrayList<>();
16:         services.iterator().forEachRemaining(list::add);
17:         return list;
18:     }
19: 
20: }