com.caucho.config.inject
Class ProducesFieldBean<X,T>

java.lang.Object
  extended by com.caucho.config.inject.AbstractBean<T>
      extended by com.caucho.config.inject.AbstractIntrospectedBean<T>
          extended by com.caucho.config.inject.ProducesFieldBean<X,T>
All Implemented Interfaces:
AnnotatedBean, PassivationSetter, ObjectProxy, Contextual<T>, Bean<T>, PassivationCapable

@Module
public class ProducesFieldBean<X,T>
extends AbstractIntrospectedBean<T>


Field Summary
 
Fields inherited from class com.caucho.config.inject.AbstractIntrospectedBean
CURRENT_ANN
 
Constructor Summary
protected ProducesFieldBean(InjectManager manager, Bean<X> producerBean, AnnotatedField<X> beanField, AnnotatedMethod<X> disposesMethod, Arg[] disposesArgs)
           
 
Method Summary
 void bind()
           
 T create(CreationalContext<T> createEnv)
          Instantiate the bean.
static ProducesFieldBean create(InjectManager manager, Bean producer, AnnotatedField beanField, AnnotatedMethod disposesMethod, Arg[] disposesArgs)
           
 void destroy(T instance, CreationalContext<T> cxt)
          Call destroy
 java.lang.Class<?> getBeanClass()
          Returns the bean class.
protected  java.lang.String getDefaultName()
           
 AnnotatedField<X> getField()
           
 Producer<T> getProducer()
           
 Bean<X> getProducerBean()
           
 void introspect()
           
 void setProducer(Producer<T> producer)
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.config.inject.AbstractIntrospectedBean
dispose, getAnnotated, getBaseType, getId, getInjectionPoints, getJavaClass, getName, getNamedValue, getQualifiers, getScope, getStereotypes, getTargetClass, getTargetName, getTargetSimpleName, getTargetType, getTypes, introspect, introspectDefault, introspectName, introspectQualifiers, introspectScope, introspectSpecializes, introspectStereotypes, isAlternative, isNormalScope, isNullable, isPassivating, isPassivationCapable, setPassivating, setPassivationId, toDebugString
 
Methods inherited from class com.caucho.config.inject.AbstractBean
calculatePassivationId, createObject, getAnnotatedType, getBeanManager, getInjectionTarget, toDisplayString, toDisplayStringImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProducesFieldBean

protected ProducesFieldBean(InjectManager manager,
                            Bean<X> producerBean,
                            AnnotatedField<X> beanField,
                            AnnotatedMethod<X> disposesMethod,
                            Arg[] disposesArgs)
Method Detail

create

public static ProducesFieldBean create(InjectManager manager,
                                       Bean producer,
                                       AnnotatedField beanField,
                                       AnnotatedMethod disposesMethod,
                                       Arg[] disposesArgs)

getProducer

public Producer<T> getProducer()

setProducer

public void setProducer(Producer<T> producer)

getProducerBean

public Bean<X> getProducerBean()

getBeanClass

public java.lang.Class<?> getBeanClass()
Description copied from interface: Bean
Returns the bean class.

Specified by:
getBeanClass in interface Bean<T>
Overrides:
getBeanClass in class AbstractIntrospectedBean<T>

getField

public AnnotatedField<X> getField()

getDefaultName

protected java.lang.String getDefaultName()
Overrides:
getDefaultName in class AbstractIntrospectedBean<T>

introspect

public void introspect()
Overrides:
introspect in class AbstractIntrospectedBean<T>

create

public T create(CreationalContext<T> createEnv)
Description copied from class: AbstractIntrospectedBean
Instantiate the bean.

Specified by:
create in interface Contextual<T>
Overrides:
create in class AbstractIntrospectedBean<T>
Parameters:
createEnv - the creation context used to support circular references.
Returns:
the new instance

destroy

public void destroy(T instance,
                    CreationalContext<T> cxt)
Description copied from class: AbstractIntrospectedBean
Call destroy

Specified by:
destroy in interface Contextual<T>
Overrides:
destroy in class AbstractIntrospectedBean<T>
Parameters:
instance - the instance to destroy

bind

public void bind()
Overrides:
bind in class AbstractIntrospectedBean<T>

toString

public java.lang.String toString()
Overrides:
toString in class AbstractBean<T>