All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.smallrye.config.inject.InjectionMessages_$bundle Maven / Gradle / Ivy

package io.smallrye.config.inject;

import java.util.Locale;
import java.lang.IllegalStateException;
import java.io.Serializable;
import java.lang.reflect.Type;
import javax.enterprise.inject.spi.InjectionPoint;
import io.smallrye.config.inject.ConfigException;
import java.lang.String;
import java.util.Arrays;
import java.lang.IllegalArgumentException;
import java.util.NoSuchElementException;

/**
 * Warning this class consists of generated code.
 */
public class InjectionMessages_$bundle implements InjectionMessages, Serializable {
    private static final long serialVersionUID = 1L;
    protected InjectionMessages_$bundle() {}
    public static final InjectionMessages_$bundle INSTANCE = new InjectionMessages_$bundle();
    protected Object readResolve() {
        return INSTANCE;
    }
    private static final Locale LOCALE = Locale.ROOT;
    protected Locale getLoggingLocale() {
        return LOCALE;
    }
    protected String noConfigValue$str() {
        return "SRCFG02000: No Config Value exists for required property %s";
    }
    @Override
    public final io.smallrye.config.inject.ConfigException noConfigValue(final String key) {
        final io.smallrye.config.inject.ConfigException result = new io.smallrye.config.inject.ConfigException(key, String.format(getLoggingLocale(), noConfigValue$str(), key));
        _copyStackTraceMinusOne(result);
        return result;
    }
    private static void _copyStackTraceMinusOne(final Throwable e) {
        final StackTraceElement[] st = e.getStackTrace();
        e.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
    }
    protected String retrieveConfigFailure$str() {
        return "SRCFG02001: Failed to retrieve config for key %s";
    }
    @Override
    public final io.smallrye.config.inject.ConfigException retrieveConfigFailure(final IllegalArgumentException cause, final String key) {
        final io.smallrye.config.inject.ConfigException result = new io.smallrye.config.inject.ConfigException(key, String.format(getLoggingLocale(), retrieveConfigFailure$str(), key));
        result.initCause(cause);
        _copyStackTraceMinusOne(result);
        return result;
    }
    protected String noConfigPropertyDefaultName$str() {
        return "SRCFG02002: Could not find default name for @ConfigProperty InjectionPoint %s";
    }
    @Override
    public final IllegalStateException noConfigPropertyDefaultName(final InjectionPoint injectionPoint) {
        final IllegalStateException result = new IllegalStateException(String.format(getLoggingLocale(), noConfigPropertyDefaultName$str(), injectionPoint));
        _copyStackTraceMinusOne(result);
        return result;
    }
    protected String unhandledConfigProperty$str() {
        return "SRCFG02003: Unhandled ConfigProperty";
    }
    @Override
    public final IllegalStateException unhandledConfigProperty() {
        final IllegalStateException result = new IllegalStateException(String.format(getLoggingLocale(), unhandledConfigProperty$str()));
        _copyStackTraceMinusOne(result);
        return result;
    }
    protected String propertyNotFound$str() {
        return "SRCFG02004: Required property %s not found";
    }
    @Override
    public final NoSuchElementException propertyNotFound(final String name) {
        final NoSuchElementException result = new NoSuchElementException(String.format(getLoggingLocale(), propertyNotFound$str(), name));
        _copyStackTraceMinusOne(result);
        return result;
    }
    protected String noRawType$str() {
        return "SRCFG02005: Type has no raw type class: %s";
    }
    @Override
    public final IllegalArgumentException noRawType(final Type type) {
        final IllegalArgumentException result = new IllegalArgumentException(String.format(getLoggingLocale(), noRawType$str(), type));
        _copyStackTraceMinusOne(result);
        return result;
    }
    protected String illegalConversion$str() {
        return "SRCFG02006: The property %s cannot be converted to %s";
    }
    @Override
    public final IllegalArgumentException illegalConversion(final String name, final Type type) {
        final IllegalArgumentException result = new IllegalArgumentException(String.format(getLoggingLocale(), illegalConversion$str(), name, type));
        _copyStackTraceMinusOne(result);
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy