Package: HardwiredSystemRoleFactoryProvider
HardwiredSystemRoleFactoryProvider
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HardwiredSystemRoleFactoryProvider() |
|
|
|
|
|
||||||||||||||||||||
getSystemRoleFactory() |
|
|
|
|
|
||||||||||||||||||||
static {...} |
|
|
|
|
|
Coverage
1: package it.tidalwave.thesefoolishthings.examples.jpafinderexample;
2:
3: import javax.annotation.Nonnull;
4: import java.util.List;
5: import it.tidalwave.role.spi.SystemRoleFactory;
6: import it.tidalwave.role.spi.SystemRoleFactoryProvider;
7: import it.tidalwave.role.spi.SystemRoleFactorySupport;
8: import it.tidalwave.thesefoolishthings.examples.jpafinderexample.impl.PersonJpaPersistable;
9:
10: // START SNIPPET: HardwiredSystemRoleFactoryProvider
11: public class HardwiredSystemRoleFactoryProvider implements SystemRoleFactoryProvider
12: {
13: private static final List<Class<?>> ROLES = List.of(PersonJpaPersistable.class);
14:
15: static class HardwiredRoleFactory extends SystemRoleFactorySupport
16: {
17: public void initialize()
18: {
19: scan(ROLES);
20: }
21: }
22:
23: @Override @Nonnull
24: public SystemRoleFactory getSystemRoleFactory ()
25: {
26: final var h = new HardwiredRoleFactory();
27: h.initialize();
28: return h;
29: }
30: }
31: // END SNIPPET: HardwiredSystemRoleFactoryProvider