Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Set;
import javax.el.ELResolver;
import javax.el.ExpressionFactory;
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedMember;
import javax.enterprise.inject.spi.AnnotatedMethod;
import javax.enterprise.inject.spi.AnnotatedParameter;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanAttributes;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InjectionTarget;
import javax.enterprise.inject.spi.InjectionTargetFactory;
import javax.enterprise.inject.spi.InterceptionFactory;
import javax.enterprise.inject.spi.InterceptionType;
import javax.enterprise.inject.spi.Interceptor;
import javax.enterprise.inject.spi.ObserverMethod;
import javax.enterprise.inject.spi.ProducerFactory;
import org.apache.webbeans.config.WebBeansContext;
/**
*
This implementation of the {@link BeanManager} will get used
* for whenever a BeanManager gets injected into a bean:
*
* private @Inject BeanManager beanManager;
*
*
* This class is Serializable and always resolves the current
* instance of the central BeanManager automatically.
*/
public class InjectableBeanManager implements BeanManager, Externalizable
{
private static final long serialVersionUID = 1L;
private transient BeanManagerImpl bm;
/**
* Used by serialization.
*/
public InjectableBeanManager()
{
this(WebBeansContext.getInstance().getBeanManagerImpl());
}
public InjectableBeanManager(BeanManagerImpl beanManager)
{
bm = beanManager;
}
@Override
public AnnotatedType createAnnotatedType(Class type)
{
return bm.createAnnotatedType(type);
}
@Override
public CreationalContext createCreationalContext(Contextual contextual)
{
return bm.createCreationalContext(contextual);
}
@Override
public InjectionTarget createInjectionTarget(AnnotatedType type)
{
return bm.createInjectionTarget(type);
}
@Override
public void fireEvent(Object event, Annotation... qualifiers)
{
bm.fireEvent(event, qualifiers);
}
@Override
public Event