@@ -0,0 +1,2798 @@
+/**%0A * Copyright (C) 2010 hprange %3Chprange@gmail.com%3E%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not%0A * use this file except in compliance with the License. You may obtain a copy of%0A * the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and limitations under%0A * the License.%0A */%0Apackage com.woinject;%0A%0Aimport static er.extensions.eof.ERXEOControlUtilities.localInstanceOfObject;%0A%0Aimport com.google.inject.OutOfScopeException;%0Aimport com.google.inject.ProvisionException;%0Aimport com.webobjects.eocontrol.EOEditingContext;%0Aimport com.webobjects.eocontrol.EOEnterpriseObject;%0A%0A/**%0A * An object capable of providing instances of type %7B@code T%7D that extends%0A * %7B@code EOEnterpriseObjects%7D. Providers are used in numerous ways by Guice.%0A * See %7B@link com.google.inject.Provider%7D for more information.%0A *%0A * @param %3CT%3E%0A *            the type of the %7B@code EOEnterpriseObject%7D this provides%0A * @see com.google.inject.Provider%0A * @author %3Ca href=%22mailto:hprange@gmail.com.br%22%3EHenrique Prange%3C/a%3E%0A * @since 1.3%0A */%0A@FunctionalInterface%0Apublic interface EOProvider%3CT extends EOEnterpriseObject%3E %7B%0A    /**%0A     * Returns a provider which always provides %7B@code instance%7D. This should%0A     * not be necessary to use in your application, but is helpful for several%0A     * types of unit tests.%0A     *%0A     * @param instance%0A     *            the instance that should always be provided. This is also%0A     *            permitted to be null, to enable aggressive testing, although%0A     *            in real life a Guice-supplied Provider will never return null.%0A     */%0A    public static %3CT extends EOEnterpriseObject%3E EOProvider%3CT%3E of(T instance) %7B%0A        return ec -%3E localInstanceOfObject(ec, instance);%0A    %7D%0A%0A    /**%0A     * Provides an instance of %7B@code T%7D in the given editing context. Must%0A     * never return %7B@code null%7D.%0A     *%0A     * @param editingContext%0A     *            the editing context used to obtain the enterprise object.%0A     * %0A     * @return Returns an instance of %7B@code T%7D in the specified editing%0A     *         context.%0A     *%0A     * @throws OutOfScopeException%0A     *             when an attempt is made to access a scoped object while the%0A     *             scope in question is not currently active%0A     * @throws ProvisionException%0A     *             if an instance cannot be provided. Such exceptions include%0A     *             messages and throwables to describe why provision failed.%0A     */%0A    public T get(EOEditingContext editingContext);%0A%7D%0A

Add an interface to facilitate the provision of EOEnterpriseObjects