Package: BlockBossStartupActionFactory

BlockBossStartupActionFactory

nameinstructionbranchcomplexitylinemethod
BlockBossStartupActionFactory()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getActionClasses()
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getTitle(Class, Locale)
M: 17 C: 10
37%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%

Coverage

1: package jmri.jmrit.blockboss;
2:
3: import java.util.Locale;
4: import jmri.util.startup.AbstractStartupActionFactory;
5: import jmri.util.startup.StartupActionFactory;
6: import org.openide.util.lookup.ServiceProvider;
7:
8: /**
9: * Factory for block boss startup actions.
10: *
11: * @author Randall Wood Copyright 2020
12: */
13: @ServiceProvider(service = StartupActionFactory.class)
14: public final class BlockBossStartupActionFactory extends AbstractStartupActionFactory {
15:
16: @Override
17: public String getTitle(Class<?> clazz, Locale locale) {
18:• if (clazz.equals(BlockBossAction.class)) {
19: return Bundle.getMessage(locale, "StartupBlockBossAction");
20: }
21: throw new IllegalArgumentException(clazz.getName() + " is not supported by " + this.getClass().getName());
22: }
23:
24: @Override
25: public Class<?>[] getActionClasses() {
26: return new Class[]{BlockBossAction.class};
27: }
28:
29: }