001package jmri.jmrix.dccpp.swing.exrail;
002
003import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
004
005import javax.annotation.CheckForNull;
006import javax.annotation.CheckReturnValue;
007import javax.annotation.ParametersAreNonnullByDefault;
008import java.util.Locale;
009
010@ParametersAreNonnullByDefault
011@CheckReturnValue
012@SuppressFBWarnings(value = {"NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", "HSM_HIDING_METHOD"},
013    justification = "Desired pattern is repeated class names with package-level access to members")
014
015@javax.annotation.concurrent.Immutable
016
017public class Bundle extends jmri.jmrix.dccpp.swing.Bundle {
018
019    @CheckForNull
020    private static final String name = null;
021
022    static String getMessage(String key) {
023        return getBundle().handleGetMessage(key);
024    }
025
026    static String getMessage(String key, Object... subs) {
027        return getBundle().handleGetMessage(key, subs);
028    }
029
030    static String getMessage(Locale locale, String key, Object... subs) {
031        return getBundle().handleGetMessage(locale, key, subs);
032    }
033
034    private static final Bundle b = new Bundle();
035
036    @Override
037    @CheckForNull
038    protected String bundleName() {
039        return name;
040    }
041
042    protected static jmri.Bundle getBundle() {
043        return b;
044    }
045
046    @Override
047    protected String retry(Locale locale, String key) {
048        return super.getBundle().handleGetMessage(locale, key);
049    }
050}