@@ -0,0 +1,2701 @@
+/*%0A * Copyright 2013 Romain Gilles%0A *%0A *    Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *    you may not use this file except in compliance with the License.%0A *    You may obtain a copy of 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,%0A *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *    See the License for the specific language governing permissions and%0A *    limitations under the License.%0A */%0A%0Apackage org.yar.guice;%0A%0Aimport com.google.inject.Binder;%0Aimport com.google.inject.Key;%0Aimport com.google.inject.TypeLiteral;%0Aimport org.yar.Supplier;%0A%0Aimport java.lang.reflect.ParameterizedType;%0Aimport java.lang.reflect.Type;%0A%0A/**%0A * TODO comment%0A * Date: 3/4/13%0A * Time: 10:11 PM%0A *%0A * @author Romain Gilles%0A */%0Apublic class SupplierRegistryBindingBuilder%3CT%3E extends RegistryBindingBuilder%3CT%3E %7B%0A%0A    public SupplierRegistryBindingBuilder(Binder binder, Key%3CT%3E key) %7B%0A        super(binder, key);%0A    %7D%0A%0A    public SupplierRegistryBindingBuilder(Binder binder, TypeLiteral%3CT%3E typeLiteral) %7B%0A        super(binder, typeLiteral);%0A    %7D%0A%0A    @Override%0A    RegistryBindingBuilder.RegistryProvider%3CT%3E newRegistryProvider() %7B%0A        return new SupplierRegistryProvider%3C%3E(key());%0A    %7D%0A%0A    private static class SupplierRegistryProvider%3CT%3E extends RegistryBindingBuilder.RegistryProvider%3CT%3E %7B%0A%0A        private SupplierRegistryProvider(Key%3CT%3E key) %7B%0A            super(key);%0A        %7D%0A%0A        @Override%0A        @SuppressWarnings(%22unchecked%22)%0A        public T get() %7B%0A            return (T)registry().get(getSupplierTypeParameter());%0A        %7D%0A%0A        @SuppressWarnings(%22unchecked%22)%0A        private GuiceKey%3CT%3E getSupplierTypeParameter() %7B%0A            Type type = key().getTypeLiteral().getType();%0A            checkParameterizedType(type);%0A            ParameterizedType parameterizedType = (ParameterizedType) type;%0A            Type%5B%5D actualTypeArguments = parameterizedType.getActualTypeArguments();%0A            if (actualTypeArguments.length != 1) %7B%0A                throw new IllegalArgumentException(%22Supplier type must be mono parameterized: %22 + type);%0A            %7D%0A%0A            return (GuiceKey%3CT%3E)GuiceKey.of(Key.get(actualTypeArguments%5B0%5D));%0A        %7D%0A%0A    %7D%0A%0A    static void checkParameterizedType(Type type) %7B%0A        if (!isParameterizedType(type)) %7B%0A            throw new IllegalArgumentException(%22Supplier type must be parameterized: %22 + type);%0A        %7D%0A    %7D%0A%0A    static boolean isParameterizedType(Type type) %7B%0A        return type instanceof ParameterizedType;%0A    %7D%0A%7D%0A

fix compilation error due to a missing class!!!