com.caucho.config.inject
Class InjectManager

java.lang.Object
  extended by com.caucho.config.inject.InjectManager
All Implemented Interfaces:
HandleAware, EnvironmentListener, java.io.Serializable, BeanManager

@ModulePrivate
public final class InjectManager
extends java.lang.Object
implements BeanManager, EnvironmentListener, java.io.Serializable, HandleAware

The CDI container for a given environment.

See Also:
Serialized Form

Nested Class Summary
 class InjectManager.ContextReferenceFactory<T>
           
 class InjectManager.DelegateReferenceFactory<T>
           
 class InjectManager.DependentElReferenceFactoryImpl<T>
           
 class InjectManager.DependentReferenceFactory<T>
           
 class InjectManager.DependentReferenceFactoryImpl<T>
           
 class InjectManager.ErrorReferenceFactory<T>
           
 class InjectManager.InjectionPointReferenceFactory
           
 class InjectManager.NormalContextReferenceFactory<T>
           
 class InjectManager.NormalInstanceReferenceFactory<T>
           
 class InjectManager.ReferenceFactory<T>
           
 class InjectManager.UnresolvedReferenceFactory
           
 
Method Summary
<T> void
addBean(Bean<T> bean)
          Processes the discovered bean
<T> void
addBean(Bean<T> bean, Annotated ann)
           
<T> void
addBean(Bean<T> bean, ProcessBean<T> process)
          Adds a new bean definition to the manager
<T> void
addBeanDiscover(Bean<T> bean)
          Processes the discovered bean
<T> void
addBeanDiscover(Bean<T> bean, Annotated ann)
          Processes the discovered bean
<T> void
addBeanImpl(Bean<T> bean, Annotated ann)
          Adds a new bean definition to the manager
 void addBeansXmlOverride(Path path, Path beansXmlPath)
           
 void addConfiguredBean(java.lang.String className)
           
 void addConfiguredClass(java.lang.String className)
           
 void addContext(Context context)
          Adds a new scope context
<X> BeanManager
addDecoratorClass(java.lang.Class<?> decoratorClass)
          Adds a new decorator class
 void addDefinitionError(java.lang.Throwable t)
           
 void addExtension(Extension extension)
           
<X> BeanManager
addInterceptorClass(java.lang.Class<?> interceptorClass)
          Adds a new decorator class
 void addLoader()
           
<X> void
addManagedBean(ManagedBeanImpl<X> managedBean)
           
<X> void
addManagedBeanDiscover(ManagedBeanImpl<X> managedBean)
           
<X> void
addManagedProduces(Bean<X> bean, AnnotatedType<X> beanType)
           
<T,X> void
addObserver(ObserverMethod<T> observer, AnnotatedMethod<X> method)
           
<X> void
addProduces(Bean<X> bean, AnnotatedType<X> beanType)
           
<X,T> void
addProducesBean(ProducesMethodBean<X,T> bean)
           
<X,T> void
addProducesFieldBean(ProducesFieldBean<X,T> bean)
           
 void addQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> qualifier)
           
 void addScope(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType, boolean isNormal, boolean isPassivating)
           
<T> Bean<T>
addSingleton(T obj)
           
 void addStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.annotation.Annotation[] annotations)
           
 void addXmlInjectionTarget(long cookie, InjectionTarget<?> target)
           
 void addXmlPath(Path path)
           
 void bind()
          Starts the bind phase
 void bindGlobals()
           
 void checkActive()
           
static InjectManager create()
          Returns the current active container.
static InjectManager create(java.lang.ClassLoader loader)
          Returns the current active container.
<T> AnnotatedType<T>
createAnnotatedType(java.lang.Class<T> cl)
          Creates an annotated type.
<T> BeanBuilder<T>
createBeanFactory(AnnotatedType<T> type)
          Returns a new instance for a class, but does not register the component with CDI.
<T> BeanBuilder<T>
createBeanFactory(java.lang.Class<T> type)
          Returns a new instance for a class, but does not register the component with webbeans.
<T> BeanBuilder<T>
createBeanFactory(ManagedBeanImpl<T> managedBean)
          Returns a new instance for a class, but does not register the component with webbeans.
 Conversation createConversation()
           
<T> CreationalContext<T>
createCreationalContext(Contextual<T> bean)
          Creates a new CreationalContext for instantiating a bean.
<T> InjectionTarget<T>
createInjectionTarget(AnnotatedType<T> type)
          Creates an injection target
<T> InjectionTarget<T>
createInjectionTarget(java.lang.Class<T> type)
          Creates a managed bean.
<T> ManagedBeanImpl<T>
createManagedBean(AnnotatedType<T> type)
          Creates a managed bean.
<T> ManagedBeanImpl<T>
createManagedBean(java.lang.Class<T> cl)
          Creates a managed bean.
<T> InjectManager.ReferenceFactory<T>
createNormalInstanceFactory(Bean<T> bean)
           
 BaseType createSourceBaseType(java.lang.reflect.Type type)
          Creates a BaseType from a Type used as a source, for example a Bean.
 BaseType createTargetBaseType(java.lang.reflect.Type type)
          Creates a BaseType from a Type used as a target, for example an injection point.
<T> T
createTransientObject(java.lang.Class<T> type)
          Creates an object, but does not register the component with webbeans.
 void destroy()
           
<X> void
discoverBean(AnnotatedType<X> beanType)
           
<T> InjectionTarget<T>
discoverInjectionTarget(AnnotatedType<T> type)
          Creates an injection target
<T> InjectionTarget<T>
discoverInjectionTarget(java.lang.Class<T> type)
          Creates a managed bean.
<T> ManagedBeanImpl<T>
discoverManagedBean(java.lang.Class<T> cl)
          Creates a managed bean.
 void environmentBind(EnvironmentClassLoader loader)
          Handles the case the environment config phase
 void environmentConfigure(EnvironmentClassLoader loader)
          Handles the case the environment config phase
 void environmentStart(EnvironmentClassLoader loader)
          Handles the case where the environment is starting (after init).
 void environmentStop(EnvironmentClassLoader loader)
          Handles the case where the environment is stopping
static ConfigException error(java.lang.reflect.Method method, java.lang.String msg)
           
protected  java.util.ArrayList<Bean<?>> findByName(java.lang.String name)
          Finds a component by its component name.
<T> T
findReference(Bean<T> bean)
          Convenience for Resin.
 void fireEvent(java.lang.Object event, java.lang.annotation.Annotation... qualifiers)
          Sends the specified event to any observer instances in the scope
 XmlCookie generateXmlCookie()
           
 ApplicationContext getApplicationScope()
           
 java.util.Set<Bean<?>> getBeans(java.lang.String name)
          Returns the bean definitions matching a given name
 java.util.Set<Bean<?>> getBeans(java.lang.reflect.Type type, java.lang.annotation.Annotation... qualifiers)
          Returns the beans matching a class and annotation set
 java.util.List<Path> getBeansXmlOverride(Path path)
           
 java.lang.ClassLoader getClassLoader()
          Returns the current active container.
 java.lang.RuntimeException getConfigException()
           
 Context getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
          Returns the scope context for the given type
 Context getContextImpl(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
          Required for TCK.
static InjectManager getCurrent()
          Returns the local container.
static InjectManager getCurrent(java.lang.ClassLoader loader)
          Returns the current environment container.
 int getDeploymentPriority(Bean<?> bean)
           
 ELResolver getELResolver()
          Returns the BeanManager's EL resolver.
 EventManager getEventManager()
           
 ExtensionManager getExtensionManager()
           
 java.lang.Object getInjectableReference(InjectionPoint ij, CreationalContext<?> parentCxt)
          Internal callback during creation to get a new injection instance.
 InjectionPointHandler getInjectionPointHandler(java.lang.Class<? extends java.lang.annotation.Annotation> annType)
           
 java.util.Set<java.lang.annotation.Annotation> getInterceptorBindingDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType)
          Returns the bindings for an interceptor binding type
 java.lang.ClassLoader getJndiClassLoader()
           
<X> Bean<X>
getMostSpecializedBean(Bean<X> bean)
           
 InjectManager getParent()
           
 Bean<?> getPassivationCapableBean(java.lang.String id)
          Returns the bean for the given passivation id.
 java.lang.annotation.Annotation[] getQualifiers(java.lang.annotation.Annotation[] annotations)
           
 java.lang.annotation.Annotation[] getQualifiers(java.util.Set<java.lang.annotation.Annotation> annotations)
           
 java.lang.Object getReference(Bean<?> bean, java.lang.reflect.Type type, CreationalContext<?> createContext)
          Returns an instance for the given bean.
<T> T
getReference(Bean<T> bean)
          Convenience for Resin.
<T> T
getReference(Bean<T> bean, CreationalContextImpl<?> parentEnv)
          Convenience for Resin.
<T> T
getReference(java.lang.Class<T> type, java.lang.annotation.Annotation... qualifiers)
          Convenience-class for Resin.
<T> T
getReference(java.lang.String name)
          Convenience-class for Resin.
<T> T
getReference(java.lang.String name, CreationalContextImpl parentEnv)
          Convenience-class for Resin.
<T> InjectManager.ReferenceFactory<T>
getReferenceFactory(Bean<T> bean)
           
 InjectManager.ReferenceFactory<?> getReferenceFactory(InjectionPoint ij)
           
 InjectManager.ReferenceFactory<?> getReferenceFactory(java.lang.String name)
           
 InjectManager.ReferenceFactory<?> getReferenceFactory(java.lang.reflect.Type type, java.util.Set<java.lang.annotation.Annotation> qualifiers, InjectionPoint ij)
           
 ResourceProgramManager getResourceManager()
           
 com.caucho.config.inject.InjectScanManager getScanManager()
           
 java.util.concurrent.atomic.AtomicBoolean getStaticMemberBoolean(java.lang.reflect.Member member)
           
 java.util.Set<java.lang.annotation.Annotation> getStereotypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
          Returns the annotations associated with a stereotype
 long getVersion()
          Returns the modification version.
 InjectionTarget<?> getXmlInjectionTarget(long cookie)
           
 void initialize()
           
static ConfigException injectError(java.lang.reflect.AccessibleObject prop, java.lang.String msg)
           
 boolean isChildManager()
           
 boolean isClosed()
           
 boolean isInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Tests if an annotation is an enabled interceptor binding type
 boolean isNormalScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Tests if an annotation is an enabled scope type
 boolean isPassivatingScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Tests if an annotation is an enabled scope type
 boolean isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Tests if an annotation is an enabled binding type
 boolean isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Tests if an annotation is an enabled scope type
 boolean isSpecialized(java.lang.Class<?> beanClass)
           
 boolean isStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Tests if an annotation is an enabled stereotype.
<T> java.util.ArrayList<T>
loadLocalServices(java.lang.Class<T> serviceClass)
           
<T> java.util.ArrayList<T>
loadServices(java.lang.Class<T> serviceClass)
           
static java.lang.String location(java.lang.reflect.Field field)
           
static java.lang.String location(java.lang.reflect.Method method)
           
 void notifyStart()
           
<T> InjectionTarget<T>
processInjectionTarget(InjectionTarget<T> target, AnnotatedType<T> ann)
           
 void processPendingAnnotatedTypes()
           
 void replaceContext(Context context)
           
<X> Bean<? extends X>
resolve(java.util.Set<Bean<? extends X>> beans)
          Returns the bean with the highest precedence deployment type from a set.
 java.util.Set<Bean<?>> resolveAllByType(java.lang.Class<?> type)
          Returns the web beans component with a given binding list.
 java.util.List<Decorator<?>> resolveDecorators(java.lang.Class<?> type)
          Called by the generated code.
 java.util.List<Decorator<?>> resolveDecorators(java.util.Set<java.lang.reflect.Type> types, java.lang.annotation.Annotation... qualifiers)
          Resolves the decorators for a given set of types
 java.util.List<Interceptor<?>> resolveInterceptors(InterceptionType type, java.lang.annotation.Annotation... qualifiers)
          Resolves the interceptors for a given interceptor type
<T> java.util.Set<ObserverMethod<? super T>>
resolveObserverMethods(T event, java.lang.annotation.Annotation... qualifiers)
          Returns the observers listening for an event
 void setDeploymentTypes(java.util.ArrayList<java.lang.Class<?>> deploymentList)
           
 void setEnableAutoUpdate(boolean isEnable)
           
 void setIsCustomExtension(boolean isCustom)
           
 void setJndiClassLoader(java.lang.ClassLoader loader)
           
 void setSerializationHandle(java.lang.Object handle)
          Callback to set the webbeans handle.
 void start()
           
 java.lang.String toString()
           
 java.lang.RuntimeException unsatisfiedException(java.lang.reflect.Type type, java.lang.annotation.Annotation[] qualifiers)
           
 void update()
           
 void updateResources()
           
 void validate(InjectionPoint ij)
          Internal callback during creation to get a new injection instance.
 InjectManager.ReferenceFactory<?> validateInjectionPoint(InjectionPoint ij)
           
 ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
          Returns the BeanManager's EL resolver.
 java.lang.Object writeReplace()
          Serialization rewriting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getVersion

public long getVersion()
Returns the modification version.


getScanManager

public com.caucho.config.inject.InjectScanManager getScanManager()

setIsCustomExtension

public void setIsCustomExtension(boolean isCustom)

getEventManager

@Module
public EventManager getEventManager()

getExtensionManager

@Module
public ExtensionManager getExtensionManager()

getCurrent

public static InjectManager getCurrent()
Returns the local container.


getCurrent

public static InjectManager getCurrent(java.lang.ClassLoader loader)
Returns the current environment container.


create

public static InjectManager create()
Returns the current active container.


create

public static InjectManager create(java.lang.ClassLoader loader)
Returns the current active container.


getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the current active container.


getJndiClassLoader

public java.lang.ClassLoader getJndiClassLoader()

isChildManager

public boolean isChildManager()

setJndiClassLoader

public void setJndiClassLoader(java.lang.ClassLoader loader)

getParent

public InjectManager getParent()

getApplicationScope

public ApplicationContext getApplicationScope()

addXmlPath

public void addXmlPath(Path path)

addBeansXmlOverride

public void addBeansXmlOverride(Path path,
                                Path beansXmlPath)

getBeansXmlOverride

public java.util.List<Path> getBeansXmlOverride(Path path)

setEnableAutoUpdate

public void setEnableAutoUpdate(boolean isEnable)

setDeploymentTypes

public void setDeploymentTypes(java.util.ArrayList<java.lang.Class<?>> deploymentList)

findByName

protected java.util.ArrayList<Bean<?>> findByName(java.lang.String name)
Finds a component by its component name.


createConversation

public Conversation createConversation()

createTransientObject

public <T> T createTransientObject(java.lang.Class<T> type)
Creates an object, but does not register the component with webbeans.


createBeanFactory

public <T> BeanBuilder<T> createBeanFactory(ManagedBeanImpl<T> managedBean)
Returns a new instance for a class, but does not register the component with webbeans.


createBeanFactory

public <T> BeanBuilder<T> createBeanFactory(java.lang.Class<T> type)
Returns a new instance for a class, but does not register the component with webbeans.


createBeanFactory

public <T> BeanBuilder<T> createBeanFactory(AnnotatedType<T> type)
Returns a new instance for a class, but does not register the component with CDI.


addSingleton

public <T> Bean<T> addSingleton(T obj)

addScope

@Module
public void addScope(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType,
                            boolean isNormal,
                            boolean isPassivating)

isScope

public boolean isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled scope type

Specified by:
isScope in interface BeanManager

isNormalScope

public boolean isNormalScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled scope type

Specified by:
isNormalScope in interface BeanManager

isPassivatingScope

public boolean isPassivatingScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled scope type

Specified by:
isPassivatingScope in interface BeanManager

addQualifier

@Module
public void addQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> qualifier)

isQualifier

public boolean isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled binding type

Specified by:
isQualifier in interface BeanManager

isInterceptorBinding

public boolean isInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled interceptor binding type

Specified by:
isInterceptorBinding in interface BeanManager

getInterceptorBindingDefinition

public java.util.Set<java.lang.annotation.Annotation> getInterceptorBindingDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType)
Returns the bindings for an interceptor binding type

Specified by:
getInterceptorBindingDefinition in interface BeanManager

addStereotype

@Module
public void addStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                 java.lang.annotation.Annotation[] annotations)

isStereotype

public boolean isStereotype(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Tests if an annotation is an enabled stereotype.

Specified by:
isStereotype in interface BeanManager

getStereotypeDefinition

public java.util.Set<java.lang.annotation.Annotation> getStereotypeDefinition(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
Returns the annotations associated with a stereotype

Specified by:
getStereotypeDefinition in interface BeanManager

createTargetBaseType

public BaseType createTargetBaseType(java.lang.reflect.Type type)
Creates a BaseType from a Type used as a target, for example an injection point.


createSourceBaseType

public BaseType createSourceBaseType(java.lang.reflect.Type type)
Creates a BaseType from a Type used as a source, for example a Bean.


createAnnotatedType

public <T> AnnotatedType<T> createAnnotatedType(java.lang.Class<T> cl)
Creates an annotated type.

Specified by:
createAnnotatedType in interface BeanManager

createInjectionTarget

public <T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T> type)
Creates an injection target

Specified by:
createInjectionTarget in interface BeanManager

discoverInjectionTarget

public <T> InjectionTarget<T> discoverInjectionTarget(AnnotatedType<T> type)
Creates an injection target


createInjectionTarget

public <T> InjectionTarget<T> createInjectionTarget(java.lang.Class<T> type)
Creates a managed bean.


discoverInjectionTarget

public <T> InjectionTarget<T> discoverInjectionTarget(java.lang.Class<T> type)
Creates a managed bean.


addObserver

public <T,X> void addObserver(ObserverMethod<T> observer,
                              AnnotatedMethod<X> method)

createManagedBean

public <T> ManagedBeanImpl<T> createManagedBean(AnnotatedType<T> type)
Creates a managed bean.


createManagedBean

public <T> ManagedBeanImpl<T> createManagedBean(java.lang.Class<T> cl)
Creates a managed bean.


discoverManagedBean

public <T> ManagedBeanImpl<T> discoverManagedBean(java.lang.Class<T> cl)
Creates a managed bean.


addBeanDiscover

public <T> void addBeanDiscover(Bean<T> bean)
Processes the discovered bean


addBean

public <T> void addBean(Bean<T> bean)
Processes the discovered bean


addBeanDiscover

@Module
public <T> void addBeanDiscover(Bean<T> bean,
                                       Annotated ann)
Processes the discovered bean


addBean

@Module
public <T> void addBean(Bean<T> bean,
                               Annotated ann)

addBean

public <T> void addBean(Bean<T> bean,
                        ProcessBean<T> process)
Adds a new bean definition to the manager


addBeanImpl

public <T> void addBeanImpl(Bean<T> bean,
                            Annotated ann)
Adds a new bean definition to the manager


getResourceManager

public ResourceProgramManager getResourceManager()

getBeans

public java.util.Set<Bean<?>> getBeans(java.lang.String name)
Returns the bean definitions matching a given name

Specified by:
getBeans in interface BeanManager
Parameters:
name - the name of the bean to match

getStaticMemberBoolean

@Module
public java.util.concurrent.atomic.AtomicBoolean getStaticMemberBoolean(java.lang.reflect.Member member)

getReferenceFactory

@Module
public InjectManager.ReferenceFactory<?> getReferenceFactory(java.lang.String name)

getBeans

public java.util.Set<Bean<?>> getBeans(java.lang.reflect.Type type,
                                       java.lang.annotation.Annotation... qualifiers)
Returns the beans matching a class and annotation set

Specified by:
getBeans in interface BeanManager
Parameters:
type - the bean's class
qualifiers - required @Qualifier annotations

resolveAllByType

public java.util.Set<Bean<?>> resolveAllByType(java.lang.Class<?> type)
Returns the web beans component with a given binding list.


getMostSpecializedBean

public <X> Bean<X> getMostSpecializedBean(Bean<X> bean)

isSpecialized

@Module
public boolean isSpecialized(java.lang.Class<?> beanClass)

resolve

public <X> Bean<? extends X> resolve(java.util.Set<Bean<? extends X>> beans)
Description copied from interface: BeanManager
Returns the bean with the highest precedence deployment type from a set.

Specified by:
resolve in interface BeanManager
Parameters:
beans - the set of beans to select from

validate

public void validate(InjectionPoint ij)
Description copied from interface: BeanManager
Internal callback during creation to get a new injection instance.

Specified by:
validate in interface BeanManager

validateInjectionPoint

public InjectManager.ReferenceFactory<?> validateInjectionPoint(InjectionPoint ij)

getDeploymentPriority

public int getDeploymentPriority(Bean<?> bean)

createCreationalContext

public <T> CreationalContext<T> createCreationalContext(Contextual<T> bean)
Description copied from interface: BeanManager
Creates a new CreationalContext for instantiating a bean. Normally used for getReference by frameworks.

Specified by:
createCreationalContext in interface BeanManager

getReference

public <T> T getReference(java.lang.Class<T> type,
                          java.lang.annotation.Annotation... qualifiers)
Convenience-class for Resin.


getReference

public <T> T getReference(Bean<T> bean)
Convenience for Resin.


findReference

public <T> T findReference(Bean<T> bean)
Convenience for Resin.


getReference

public <T> T getReference(Bean<T> bean,
                          CreationalContextImpl<?> parentEnv)
Convenience for Resin.


getReference

public <T> T getReference(java.lang.String name)
Convenience-class for Resin.


getReference

public <T> T getReference(java.lang.String name,
                          CreationalContextImpl parentEnv)
Convenience-class for Resin.


getReference

public java.lang.Object getReference(Bean<?> bean,
                                     java.lang.reflect.Type type,
                                     CreationalContext<?> createContext)
Returns an instance for the given bean. This method will obey the scope of the bean, so a singleton will return the single bean.

Specified by:
getReference in interface BeanManager
Parameters:
bean - the metadata for the bean
type - the expected type
createContext - the creational context environment for the bean
Returns:
an instance of the bean obeying scope

getReferenceFactory

public <T> InjectManager.ReferenceFactory<T> getReferenceFactory(Bean<T> bean)

createNormalInstanceFactory

public <T> InjectManager.ReferenceFactory<T> createNormalInstanceFactory(Bean<T> bean)

unsatisfiedException

public java.lang.RuntimeException unsatisfiedException(java.lang.reflect.Type type,
                                                       java.lang.annotation.Annotation[] qualifiers)

getInjectionPointHandler

public InjectionPointHandler getInjectionPointHandler(java.lang.Class<? extends java.lang.annotation.Annotation> annType)

getInjectableReference

public java.lang.Object getInjectableReference(InjectionPoint ij,
                                               CreationalContext<?> parentCxt)
Internal callback during creation to get a new injection instance.

Specified by:
getInjectableReference in interface BeanManager

getReferenceFactory

public InjectManager.ReferenceFactory<?> getReferenceFactory(InjectionPoint ij)

getReferenceFactory

public InjectManager.ReferenceFactory<?> getReferenceFactory(java.lang.reflect.Type type,
                                                             java.util.Set<java.lang.annotation.Annotation> qualifiers,
                                                             InjectionPoint ij)

getELResolver

public ELResolver getELResolver()
Description copied from interface: BeanManager
Returns the BeanManager's EL resolver.

Specified by:
getELResolver in interface BeanManager

wrapExpressionFactory

public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
Description copied from interface: BeanManager
Returns the BeanManager's EL resolver.

Specified by:
wrapExpressionFactory in interface BeanManager

addContext

public void addContext(Context context)
Adds a new scope context


replaceContext

public void replaceContext(Context context)

getContext

public Context getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Returns the scope context for the given type

Specified by:
getContext in interface BeanManager

getContextImpl

public Context getContextImpl(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Required for TCK. Returns the scope context for the given type.


getPassivationCapableBean

public Bean<?> getPassivationCapableBean(java.lang.String id)
Returns the bean for the given passivation id.

Specified by:
getPassivationCapableBean in interface BeanManager
Parameters:
id - the basic bean

getQualifiers

public java.lang.annotation.Annotation[] getQualifiers(java.util.Set<java.lang.annotation.Annotation> annotations)

getQualifiers

public java.lang.annotation.Annotation[] getQualifiers(java.lang.annotation.Annotation[] annotations)

fireEvent

public void fireEvent(java.lang.Object event,
                      java.lang.annotation.Annotation... qualifiers)
Sends the specified event to any observer instances in the scope

Specified by:
fireEvent in interface BeanManager
Parameters:
event - the event to fire
qualifiers - the event qualifiers

resolveObserverMethods

public <T> java.util.Set<ObserverMethod<? super T>> resolveObserverMethods(T event,
                                                                           java.lang.annotation.Annotation... qualifiers)
Returns the observers listening for an event

Specified by:
resolveObserverMethods in interface BeanManager
Parameters:
event - to resolve
qualifiers - the binding set for the event

addInterceptorClass

public <X> BeanManager addInterceptorClass(java.lang.Class<?> interceptorClass)
Adds a new decorator class


resolveInterceptors

public java.util.List<Interceptor<?>> resolveInterceptors(InterceptionType type,
                                                          java.lang.annotation.Annotation... qualifiers)
Resolves the interceptors for a given interceptor type

Specified by:
resolveInterceptors in interface BeanManager
Parameters:
type - the main interception type
qualifiers - qualifying bindings
Returns:
the matching interceptors

addDecoratorClass

public <X> BeanManager addDecoratorClass(java.lang.Class<?> decoratorClass)
Adds a new decorator class


resolveDecorators

public java.util.List<Decorator<?>> resolveDecorators(java.lang.Class<?> type)
Called by the generated code.


resolveDecorators

public java.util.List<Decorator<?>> resolveDecorators(java.util.Set<java.lang.reflect.Type> types,
                                                      java.lang.annotation.Annotation... qualifiers)
Resolves the decorators for a given set of types

Specified by:
resolveDecorators in interface BeanManager
Parameters:
types - the types to match for the decorator
qualifiers - qualifying bindings
Returns:
the matching interceptors

addConfiguredClass

public void addConfiguredClass(java.lang.String className)

generateXmlCookie

public XmlCookie generateXmlCookie()

addLoader

public void addLoader()

update

public void update()

updateResources

public void updateResources()

processPendingAnnotatedTypes

public void processPendingAnnotatedTypes()

discoverBean

public <X> void discoverBean(AnnotatedType<X> beanType)

processInjectionTarget

public <T> InjectionTarget<T> processInjectionTarget(InjectionTarget<T> target,
                                                     AnnotatedType<T> ann)

addProduces

public <X> void addProduces(Bean<X> bean,
                            AnnotatedType<X> beanType)

addManagedProduces

public <X> void addManagedProduces(Bean<X> bean,
                                   AnnotatedType<X> beanType)

addProducesBean

public <X,T> void addProducesBean(ProducesMethodBean<X,T> bean)

addProducesFieldBean

public <X,T> void addProducesFieldBean(ProducesFieldBean<X,T> bean)

addManagedBeanDiscover

public <X> void addManagedBeanDiscover(ManagedBeanImpl<X> managedBean)

addManagedBean

public <X> void addManagedBean(ManagedBeanImpl<X> managedBean)

loadServices

public <T> java.util.ArrayList<T> loadServices(java.lang.Class<T> serviceClass)

loadLocalServices

public <T> java.util.ArrayList<T> loadLocalServices(java.lang.Class<T> serviceClass)

addExtension

public void addExtension(Extension extension)

bind

public void bind()
Starts the bind phase


bindGlobals

public void bindGlobals()

environmentConfigure

public void environmentConfigure(EnvironmentClassLoader loader)
Handles the case the environment config phase

Specified by:
environmentConfigure in interface EnvironmentListener

environmentBind

public void environmentBind(EnvironmentClassLoader loader)
Handles the case the environment config phase

Specified by:
environmentBind in interface EnvironmentListener

environmentStart

public void environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init).

Specified by:
environmentStart in interface EnvironmentListener

initialize

public void initialize()

start

public void start()

notifyStart

public void notifyStart()

addDefinitionError

public void addDefinitionError(java.lang.Throwable t)

getConfigException

public java.lang.RuntimeException getConfigException()

addConfiguredBean

public void addConfiguredBean(java.lang.String className)

addXmlInjectionTarget

public void addXmlInjectionTarget(long cookie,
                                  InjectionTarget<?> target)

getXmlInjectionTarget

public InjectionTarget<?> getXmlInjectionTarget(long cookie)

environmentStop

public void environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping

Specified by:
environmentStop in interface EnvironmentListener

destroy

public void destroy()

injectError

public static ConfigException injectError(java.lang.reflect.AccessibleObject prop,
                                          java.lang.String msg)

location

public static java.lang.String location(java.lang.reflect.Field field)

location

public static java.lang.String location(java.lang.reflect.Method method)

error

public static ConfigException error(java.lang.reflect.Method method,
                                    java.lang.String msg)

setSerializationHandle

public void setSerializationHandle(java.lang.Object handle)
Description copied from interface: HandleAware
Callback to set the webbeans handle.

Specified by:
setSerializationHandle in interface HandleAware

writeReplace

public java.lang.Object writeReplace()
Serialization rewriting


checkActive

public void checkActive()

isClosed

public boolean isClosed()
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object