Initialisation depot

This commit is contained in:
Serge NOEL
2026-06-17 14:00:51 +02:00
commit efdf1683af
33190 changed files with 5907629 additions and 0 deletions
@@ -0,0 +1,64 @@
package jmri.util.managers;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import jmri.InstanceManager;
import jmri.Light;
import jmri.jmrix.internal.InternalLightManager;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class InternalLightManagerThrowExceptionScaffold extends InternalLightManager {
public InternalLightManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
protected Light createNewLight(@Nonnull String systemName, String userName) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Light provideLight(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@CheckForNull
public Light getLight(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@CheckForNull
public Light getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@CheckForNull
public Light getByUserName(@Nonnull String key) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Light newLight(@Nonnull String systemName, @CheckForNull String userName) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,62 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import javax.annotation.CheckForNull;
import jmri.InstanceManager;
import jmri.Memory;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
import jmri.managers.DefaultMemoryManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class MemoryManagerThrowExceptionScaffold extends DefaultMemoryManager {
public MemoryManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
@Nonnull
protected Memory createNewMemory(@Nonnull String systemName, @CheckForNull String userName) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Memory provideMemory(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Memory getMemory(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Memory getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Memory getByUserName(@Nonnull String key) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Memory newMemory(@Nonnull String systemName, @CheckForNull String userName) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,50 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import jmri.jmrit.logix.OBlock;
import jmri.jmrit.logix.OBlockManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class OBlockManagerThrowExceptionScaffold extends OBlockManager {
public OBlockManagerThrowExceptionScaffold() {
super();
}
/** {@inheritDoc} */
@Override
public OBlock createNewOBlock(String systemName, String userName) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull public OBlock provideOBlock(String name) throws IllegalArgumentException {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public OBlock getOBlock(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public OBlock getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public OBlock getByUserName(String key) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,54 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import jmri.InstanceManager;
import jmri.Route;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
import jmri.managers.DefaultRouteManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class RouteManagerThrowExceptionScaffold extends DefaultRouteManager {
public RouteManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
@Nonnull
public Route provideRoute(@Nonnull String systemName, String userName) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Route getRoute(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Route getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Route getByUserName(@Nonnull String key) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Route newRoute(@Nonnull String userName) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,62 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import javax.annotation.CheckForNull;
import jmri.InstanceManager;
import jmri.Sensor;
import jmri.jmrix.internal.InternalSensorManager;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class SensorManagerThrowExceptionScaffold extends InternalSensorManager {
public SensorManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
@Nonnull
protected Sensor createNewSensor(@Nonnull String systemName, String userName) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Sensor provideSensor(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Sensor getSensor(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Sensor getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Sensor getByUserName(@Nonnull String key) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Sensor newSensor(@Nonnull String systemName, @CheckForNull String userName) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,40 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import jmri.InstanceManager;
import jmri.SignalHead;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
import jmri.managers.AbstractSignalHeadManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class SignalHeadManagerThrowExceptionScaffold extends AbstractSignalHeadManager {
public SignalHeadManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
public SignalHead getSignalHead(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public SignalHead getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public SignalHead getByUserName(@Nonnull String key) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,46 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import jmri.InstanceManager;
import jmri.SignalMast;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
import jmri.managers.DefaultSignalMastManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class SignalMastManagerThrowExceptionScaffold extends DefaultSignalMastManager {
public SignalMastManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
public SignalMast provideSignalMast(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public SignalMast getSignalMast(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public SignalMast getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public SignalMast getByUserName(String key) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,61 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import javax.annotation.CheckForNull;
import jmri.InstanceManager;
import jmri.Turnout;
import jmri.jmrix.internal.InternalSystemConnectionMemo;
import jmri.jmrix.internal.InternalTurnoutManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class TurnoutManagerThrowExceptionScaffold extends InternalTurnoutManager {
public TurnoutManagerThrowExceptionScaffold() {
super(InstanceManager.getDefault(InternalSystemConnectionMemo.class));
}
/** {@inheritDoc} */
@Override
protected Turnout createNewTurnout(@Nonnull String systemName, String userName) throws IllegalArgumentException {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Turnout provideTurnout(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Turnout getTurnout(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Turnout getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Turnout getByUserName(@Nonnull String key) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
@Nonnull
public Turnout newTurnout(@Nonnull String systemName, @CheckForNull String userName) {
throw new IllegalArgumentException("Illegal argument");
}
}
@@ -0,0 +1,50 @@
package jmri.util.managers;
import javax.annotation.Nonnull;
import jmri.jmrit.logix.Warrant;
import jmri.jmrit.logix.WarrantManager;
/**
* This manager always throws an IllegalArgumentException from provide and get methods.
* It is used for testing exception handling in tests.
*
* The class name ends with 'Scaffold' to exclude it from the coverage statistics,
* since it is part of the testing infrastructure.
*/
public class WarrantManagerThrowExceptionScaffold extends WarrantManager {
public WarrantManagerThrowExceptionScaffold() {
super();
}
/** {@inheritDoc} */
@Override
public Warrant createNewWarrant(String systemName, String userName, boolean sCWa, long tTP) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Warrant provideWarrant(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Warrant getWarrant(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Warrant getBySystemName(@Nonnull String name) {
throw new IllegalArgumentException("Illegal argument");
}
/** {@inheritDoc} */
@Override
public Warrant getByUserName(String key) {
throw new IllegalArgumentException("Illegal argument");
}
}