/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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 org.apache.webbeans.container;

import java.lang.annotation.Annotation;

import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedParameter;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;

import org.apache.webbeans.config.WebBeansContext;
import org.apache.webbeans.util.AnnotationUtil;

public abstract class AbstractBeanManager implements BeanManager
{

    protected abstract WebBeansContext getWebBeansContext();
    
    public boolean areInterceptorBindingsEquivalent(Annotation annotation1, Annotation annotation2)
    {
        return AnnotationUtil.isCdiAnnotationEqual(annotation1, annotation2);
    }

    public boolean areQualifiersEquivalent(Annotation annotation1, Annotation annotation2)
    {
        return AnnotationUtil.isCdiAnnotationEqual(annotation1, annotation2);
    }

    public int getInterceptorBindingHashCode(Annotation annotation)
    {
        return AnnotationUtil.getCdiAnnotationHashCode(annotation);
    }

    public int getQualifierHashCode(Annotation annotation)
    {
        return AnnotationUtil.getCdiAnnotationHashCode(annotation);
    }

    public InjectionPoint createInjectionPoint(AnnotatedField<?> field)
    {
        return getWebBeansContext().getInjectionPointFactory().buildInjectionPoint(null, field);
    }

    public InjectionPoint createInjectionPoint(AnnotatedParameter<?> parameter)
    {
        return getWebBeansContext().getInjectionPointFactory().buildInjectionPoint(null, parameter);
    }
}

@@ -975,118 +975,521 @@
 ated
-Parameter;%0Aimport javax.enterprise.inject.spi.BeanManager;%0Aimport javax.enterprise.inject.spi.InjectionPoint;%0A
+Method;%0Aimport javax.enterprise.inject.spi.AnnotatedParameter;%0Aimport javax.enterprise.inject.spi.AnnotatedType;%0Aimport javax.enterprise.inject.spi.Bean;%0Aimport javax.enterprise.inject.spi.BeanManager;%0Aimport javax.enterprise.inject.spi.InjectionPoint;%0A%0Aimport org.apache.webbeans.component.creation.FieldProducerFactory;%0Aimport org.apache.webbeans.component.creation.MethodProducerFactory;%0Aimport org.apache.webbeans.component.spi.InjectionTargetFactory;%0Aimport org.apache.webbeans.component.spi.ProducerFactory;
 %0Aimp
@@ -2755,11 +2755,584 @@
 );%0A    %7D
+%0A%0A    public %3CX%3E ProducerFactory%3CX%3E getProducerFactory(AnnotatedField%3C? super X%3E field, Bean%3CX%3E bean)%0A    %7B%0A        return new FieldProducerFactory%3CX%3E(field, bean, getWebBeansContext());%0A    %7D%0A%0A    public %3CX%3E ProducerFactory%3CX%3E getProducerFactory(AnnotatedMethod%3C? super X%3E method, Bean%3CX%3E bean)%0A    %7B%0A        return new MethodProducerFactory%3CX%3E(method, bean, getWebBeansContext());%0A    %7D%0A    %0A    public %3CX%3E InjectionTargetFactory%3CX%3E getInjectionTargetFactory(AnnotatedType%3CX%3E type)%0A    %7B%0A        return new InjectionTargetFactoryImpl%3CX%3E(type, getWebBeansContext());%0A    %7D
 %0A%7D%0A

Implement BeanManager.getInjectionTargetFactory and BeanManager.getProducerFactory