// Path: src/main/java/pl/wavesoftware/eid/api/Binding.java
// public interface Binding {
// 
//     /**
//      * Gets a configuration system
//      *
//      * @return a configuration system
//      */
//     ConfigurationSystem getConfigurationSystem();
// 
//     /**
//      * Get bound Eid factories to be used to perform various Eid
//      * related operations.
//      *
//      * @return a factories for various Eid related things.
//      */
//     EidFactories getFactories();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidFactories.java
// public interface EidFactories {
// 
//     /**
//      * Gets an Eid message factory.
//      *
//      * @return a factory for Eid messages.
//      */
//     EidMessageFactory getMessageFactory();
// 
//     /**
//      * Gets a factory for lazy objects.
//      *
//      * @return a lazy objects factory.
//      */
//     LazyFactory getLazyFactory();
// 
//     /**
//      * Gets a Eid object factory.
//      *
//      * @return a factory for Eid objects
//      */
//     EidFactory getEidFactory();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidFactory.java
// public interface EidFactory {
//     /**
//      * Constructs a single value of exception ID.
//      *
//      * @param id the exception id, should be uniquely generated by developer
//      * @return a created Eid object
//      */
//     Eid create(CharSequence id);
// 
//     /**
//      * Constructs with two values an exception ID and reference of some sort.
//      * The second reference can be used to hold reference from external system.
//      *
//      * @param id  the exception id, should be uniquely generated by developer
//      * @param ref a reference from external system
//      * @return a created Eid object
//      */
//     Eid create(CharSequence id, CharSequence ref);
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidMessageFactory.java
// public interface EidMessageFactory {
//     /**
//      * Create a Exception ID message, from Eid, message template and
//      * template arguments.
//      *
//      * @param eid               an Exception ID object
//      * @param messageTemplate   message template in form accepted by
//      *                          {@link java.text.MessageFormat#format(String, Object...)}
//      * @param templateArguments a template arguments to be used to interpolate
//      *                          into message
//      * @return a create message with Eid number
//      */
//     EidMessage create(
//         Eid eid,
//         CharSequence messageTemplate,
//         Object[] templateArguments
//     );
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/LazyFactory.java
// public interface LazyFactory {
//     /**
//      * Creates a lazy supplier of a given supplier of serializable value
//      *
//      * @param supplier a supplier of serializable value
//      * @param <T> a serializable type
//      * @return a lazy, serializable, supplier
//      */
//     <T extends Serializable> SerializableSupplier<T> lazy(Supplier<T> supplier);
// }


import pl.wavesoftware.eid.api.Binding;
import pl.wavesoftware.eid.api.EidFactories;
import pl.wavesoftware.eid.api.EidFactory;
import pl.wavesoftware.eid.api.EidMessageFactory;
import pl.wavesoftware.eid.api.LazyFactory;
/*
 * Copyright (c) 2018 Wave Software
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package pl.wavesoftware.eid.impl;


/**
 * @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
 * @since 2018-12-17
 */
final class EidFactoriesImpl implements EidFactories {
    private final EidMessageFactory eidMessageFactory;
    private final LazyFactory lazyFactory;
    private final EidFactory eidFactory;

    EidFactoriesImpl(Binding binding) {
        eidMessageFactory = new EidMessageFactoryImpl(binding);
        lazyFactory = new LazyFactoryImpl();
        eidFactory = new EidFactoryImpl();
    }

    @Override
    public EidMessageFactory getMessageFactory() {
        return eidMessageFactory;
    }

    @Override
// Path: src/main/java/pl/wavesoftware/eid/api/Binding.java
// public interface Binding {
// 
//     /**
//      * Gets a configuration system
//      *
//      * @return a configuration system
//      */
//     ConfigurationSystem getConfigurationSystem();
// 
//     /**
//      * Get bound Eid factories to be used to perform various Eid
//      * related operations.
//      *
//      * @return a factories for various Eid related things.
//      */
//     EidFactories getFactories();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidFactories.java
// public interface EidFactories {
// 
//     /**
//      * Gets an Eid message factory.
//      *
//      * @return a factory for Eid messages.
//      */
//     EidMessageFactory getMessageFactory();
// 
//     /**
//      * Gets a factory for lazy objects.
//      *
//      * @return a lazy objects factory.
//      */
//     LazyFactory getLazyFactory();
// 
//     /**
//      * Gets a Eid object factory.
//      *
//      * @return a factory for Eid objects
//      */
//     EidFactory getEidFactory();
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidFactory.java
// public interface EidFactory {
//     /**
//      * Constructs a single value of exception ID.
//      *
//      * @param id the exception id, should be uniquely generated by developer
//      * @return a created Eid object
//      */
//     Eid create(CharSequence id);
// 
//     /**
//      * Constructs with two values an exception ID and reference of some sort.
//      * The second reference can be used to hold reference from external system.
//      *
//      * @param id  the exception id, should be uniquely generated by developer
//      * @param ref a reference from external system
//      * @return a created Eid object
//      */
//     Eid create(CharSequence id, CharSequence ref);
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/EidMessageFactory.java
// public interface EidMessageFactory {
//     /**
//      * Create a Exception ID message, from Eid, message template and
//      * template arguments.
//      *
//      * @param eid               an Exception ID object
//      * @param messageTemplate   message template in form accepted by
//      *                          {@link java.text.MessageFormat#format(String, Object...)}
//      * @param templateArguments a template arguments to be used to interpolate
//      *                          into message
//      * @return a create message with Eid number
//      */
//     EidMessage create(
//         Eid eid,
//         CharSequence messageTemplate,
//         Object[] templateArguments
//     );
// }
// 
// Path: src/main/java/pl/wavesoftware/eid/api/LazyFactory.java
// public interface LazyFactory {
//     /**
//      * Creates a lazy supplier of a given supplier of serializable value
//      *
//      * @param supplier a supplier of serializable value
//      * @param <T> a serializable type
//      * @return a lazy, serializable, supplier
//      */
//     <T extends Serializable> SerializableSupplier<T> lazy(Supplier<T> supplier);
// }


// Path: src/main/java/pl/wavesoftware/eid/impl/EidFactoriesImpl.java
import pl.wavesoftware.eid.api.Binding;
import pl.wavesoftware.eid.api.EidFactories;
import pl.wavesoftware.eid.api.EidFactory;
import pl.wavesoftware.eid.api.EidMessageFactory;
import pl.wavesoftware.eid.api.LazyFactory;

/*
 * Copyright (c) 2018 Wave Software
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package pl.wavesoftware.eid.impl;


/**
 * @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
 * @since 2018-12-17
 */
final class EidFactoriesImpl implements EidFactories {
    private final EidMessageFactory eidMessageFactory;
    private final LazyFactory lazyFactory;
    private final EidFactory eidFactory;

    EidFactoriesImpl(Binding binding) {
        eidMessageFactory = new EidMessageFactoryImpl(binding);
        lazyFactory = new LazyFactoryImpl();
        eidFactory = new EidFactoryImpl();
    }

    @Override
    public EidMessageFactory getMessageFactory() {
        return eidMessageFactory;
    }

    @Override
    public LazyFactory getLazyFactory() {