@@ -0,0 +1,2446 @@
+/*%0A * Grapht, an open source dependency injector.%0A * Copyright 2010-2012 Regents of the University of Minnesota and contributors%0A *%0A * This program is free software; you can redistribute it and/or modify%0A * it under the terms of the GNU Lesser General Public License as%0A * published by the Free Software Foundation; either version 2.1 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful, but WITHOUT%0A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more%0A * details.%0A *%0A * You should have received a copy of the GNU General Public License along with%0A * this program; if not, write to the Free Software Foundation, Inc., 51%0A * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%0A */%0Apackage org.grouplens.grapht.spi;%0A%0Aimport javax.inject.Provider;%0A%0A/**%0A * Abstract implementation of %7B@link SatisfactionVisitor%7D.  All methods delegate to%0A * %7B@link #visitDefault()%7D, which in turn returns a default value.%0A *%0A * @author Michael Ekstrand%0A * @since 0.5%0A */%0Apublic abstract class AbstractSatisfactionVisitor%3CT%3E implements SatisfactionVisitor%3CT%3E %7B%0A    protected final T defaultValue;%0A%0A    /**%0A     * Construct a visitor with a null default.%0A     */%0A    public AbstractSatisfactionVisitor() %7B%0A        this(null);%0A    %7D%0A%0A    /**%0A     * Construct a visitor with the specified default value.%0A     *%0A     * @param dft The default value to be returned by %7B@link #visitDefault()%7D.%0A     */%0A    public AbstractSatisfactionVisitor(T dft) %7B%0A        defaultValue = dft;%0A    %7D%0A%0A    /**%0A     * Default method called when other methods are not overridden.  The default implementation%0A     * returns the default value provided to %7B@link #AbstractSatisfactionVisitor(Object)%7D.%0A     * @return The return value.%0A     */%0A    public T visitDefault() %7B%0A        return defaultValue;%0A    %7D%0A%0A    @Override%0A    public T visitNull() %7B%0A        return visitDefault();%0A    %7D%0A%0A    @Override%0A    public T visitClass(Class%3C?%3E clazz) %7B%0A        return visitDefault();%0A    %7D%0A%0A    @Override%0A    public T visitInstance(Object instance) %7B%0A        return visitDefault();%0A    %7D%0A%0A    @Override%0A    public T visitProviderClass(Class%3C? extends Provider%3C?%3E%3E pclass) %7B%0A        return visitDefault();%0A    %7D%0A%0A    @Override%0A    public T visitProviderInstance(Provider%3C?%3E provider) %7B%0A        return visitDefault();%0A    %7D%0A%7D%0A

Add abstract satisfaction visitor (refs #33)