// Path: src/main/java/pl/wavesoftware/eid/api/EidContainer.java
// public interface EidContainer {
// 
//     /**
//      * Retrieves a Eid object
//      *
//      * @return Eid object
//      */
//     Eid getEid();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/Eid.java
// public interface Eid extends Serializable {
//     /**
//      * Getter for constant Exception ID
//      *
//      * @return ID of exception
//      */
//     String getId();
// 
//     /**
//      * Get an external reference passed to Exception ID
//      *
//      * @return an external reference, or null if not set
//      */
//     @Nullable
//     String getRef();
// 
//     /**
//      * Do this Exception ID has an external reference number?
//      *
//      * @return true, if has an external reference
//      */
//     boolean hasRef();
// 
//     /**
//      * Gets unique generated string for this instance of Eid
//      *
//      * @return a unique string
//      */
//     String getUnique();
// 
//     /**
//      * Creates a message object from this Eid, with given message template and
//      * template arguments. Message template and arguments will be interpolated
//      * using {@link java.text.MessageFormat#format(String, Object...)} method.
//      *
//      * @param messageTemplate   a message format
//      * @param templateArguments a message format arguments that will be
//      *                          interpolated to format string
//      * @return a message object
//      */
//     EidMessage message(
//         CharSequence messageTemplate,
//         Object... templateArguments
//     );
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidMessage.java
// public interface EidMessage extends CharSequence, EidContainer {
// 
//     /**
//      * Get a formatted message
//      *
//      * @return a formatted message
//      */
//     CharSequence getFormattedMessage();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/system/EidModule.java
// public enum EidModule {
//     MODULE;
// 
//     private final Binding binding;
// 
//     EidModule() {
//         ServiceLoader<Binding> loader = ServiceLoader.load(Binding.class);
//         BindingChooser chooser = new BindingChooser();
//         binding = chooser.chooseImplementation(loader);
//     }
// 
//     /**
//      * Provides a binding to Eid library. It can be used to reconfigure
//      * configuration programmatically.
//      *
//      * @return a binding interface
//      */
//     public Binding getBinding() {
//         return binding;
//     }
// }


import pl.wavesoftware.eid.api.EidContainer;
import pl.wavesoftware.eid.api.Eid;
import pl.wavesoftware.eid.api.EidMessage;
import pl.wavesoftware.eid.system.EidModule;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
    public EidRuntimeException(
        CharSequence eid, String message, @Nullable Throwable cause
    ) {
        this(
            EidModule.MODULE
                .getBinding()
                .getFactories()
                .getEidFactory()
                .create(eid),
            message,
            cause
        );
    }

    /**
     * Constructs a new runtime exception with the specified Exception ID,
     * detail message and cause.
     *
     * <p>
     * Note that the detail message associated with <code>cause</code> is
     * <i>not</i> automatically incorporated in this runtime exception's
     * detail message.
     *
     * @param message the Eid message (which is saved for later retrieval
     *                by the {@link #getMessage()} method).
     * @param cause   the cause (which is saved for later retrieval by the
     *                {@link #getCause()} method).  (A <tt>null</tt> value is
     *                permitted, and indicates that the cause is nonexistent or
     *                unknown.)
     */
// Path: src/main/java/pl/wavesoftware/eid/api/EidContainer.java
// public interface EidContainer {
// 
//     /**
//      * Retrieves a Eid object
//      *
//      * @return Eid object
//      */
//     Eid getEid();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/Eid.java
// public interface Eid extends Serializable {
//     /**
//      * Getter for constant Exception ID
//      *
//      * @return ID of exception
//      */
//     String getId();
// 
//     /**
//      * Get an external reference passed to Exception ID
//      *
//      * @return an external reference, or null if not set
//      */
//     @Nullable
//     String getRef();
// 
//     /**
//      * Do this Exception ID has an external reference number?
//      *
//      * @return true, if has an external reference
//      */
//     boolean hasRef();
// 
//     /**
//      * Gets unique generated string for this instance of Eid
//      *
//      * @return a unique string
//      */
//     String getUnique();
// 
//     /**
//      * Creates a message object from this Eid, with given message template and
//      * template arguments. Message template and arguments will be interpolated
//      * using {@link java.text.MessageFormat#format(String, Object...)} method.
//      *
//      * @param messageTemplate   a message format
//      * @param templateArguments a message format arguments that will be
//      *                          interpolated to format string
//      * @return a message object
//      */
//     EidMessage message(
//         CharSequence messageTemplate,
//         Object... templateArguments
//     );
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidMessage.java
// public interface EidMessage extends CharSequence, EidContainer {
// 
//     /**
//      * Get a formatted message
//      *
//      * @return a formatted message
//      */
//     CharSequence getFormattedMessage();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/system/EidModule.java
// public enum EidModule {
//     MODULE;
// 
//     private final Binding binding;
// 
//     EidModule() {
//         ServiceLoader<Binding> loader = ServiceLoader.load(Binding.class);
//         BindingChooser chooser = new BindingChooser();
//         binding = chooser.chooseImplementation(loader);
//     }
// 
//     /**
//      * Provides a binding to Eid library. It can be used to reconfigure
//      * configuration programmatically.
//      *
//      * @return a binding interface
//      */
//     public Binding getBinding() {
//         return binding;
//     }
// }


// Path: src/main/java/pl/wavesoftware/eid/exceptions/EidRuntimeException.java
import pl.wavesoftware.eid.api.EidContainer;
import pl.wavesoftware.eid.api.Eid;
import pl.wavesoftware.eid.api.EidMessage;
import pl.wavesoftware.eid.system.EidModule;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

    public EidRuntimeException(
        CharSequence eid, String message, @Nullable Throwable cause
    ) {
        this(
            EidModule.MODULE
                .getBinding()
                .getFactories()
                .getEidFactory()
                .create(eid),
            message,
            cause
        );
    }

    /**
     * Constructs a new runtime exception with the specified Exception ID,
     * detail message and cause.
     *
     * <p>
     * Note that the detail message associated with <code>cause</code> is
     * <i>not</i> automatically incorporated in this runtime exception's
     * detail message.
     *
     * @param message the Eid message (which is saved for later retrieval
     *                by the {@link #getMessage()} method).
     * @param cause   the cause (which is saved for later retrieval by the
     *                {@link #getCause()} method).  (A <tt>null</tt> value is
     *                permitted, and indicates that the cause is nonexistent or
     *                unknown.)
     */
    public EidRuntimeException(EidMessage message, @Nullable Throwable cause) {