com.caucho.config.inject
Class CandiProducer<X>

java.lang.Object
  extended by com.caucho.config.inject.CandiProducer<X>
All Implemented Interfaces:
InjectionTarget<X>, Producer<X>

@Module
public class CandiProducer<X>
extends java.lang.Object
implements InjectionTarget<X>

SimpleBean represents a POJO Java bean registered as a WebBean.


Constructor Summary
CandiProducer(Bean<X> bean, java.lang.Class<X> instanceClass, java.lang.reflect.Constructor<X> javaCtor, Arg[] args, ConfigProgram[] injectProgram, ConfigProgram[] initProgram, ConfigProgram[] destroyProgram, java.util.Set<InjectionPoint> injectionPointSet)
           
 
Method Summary
 void bind()
           
 void dispose(X instance)
          Dispose the bean.
 java.util.Set<InjectionPoint> getInjectionPoints()
          Returns the injection points.
 ConfigProgram[] getPostConstructProgram()
           
 void inject(X instance, CreationalContext<X> env)
          Inject the bean.
 void postConstruct(X instance)
          PostConstruct initialization
 void preDestroy(X instance)
          Call pre-destroy
 X produce(CreationalContext<X> ctx)
          Instantiate the bean.
 void setPostConstructProgram(ConfigProgram[] initProgram)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CandiProducer

public CandiProducer(Bean<X> bean,
                     java.lang.Class<X> instanceClass,
                     java.lang.reflect.Constructor<X> javaCtor,
                     Arg[] args,
                     ConfigProgram[] injectProgram,
                     ConfigProgram[] initProgram,
                     ConfigProgram[] destroyProgram,
                     java.util.Set<InjectionPoint> injectionPointSet)
Method Detail

getInjectionPoints

public java.util.Set<InjectionPoint> getInjectionPoints()
Returns the injection points.

Specified by:
getInjectionPoints in interface Producer<X>

bind

public void bind()

produce

public X produce(CreationalContext<X> ctx)
Description copied from interface: Producer
Instantiate the bean.

Specified by:
produce in interface Producer<X>

inject

public void inject(X instance,
                   CreationalContext<X> env)
Description copied from interface: InjectionTarget
Inject the bean.

Specified by:
inject in interface InjectionTarget<X>

getPostConstructProgram

public ConfigProgram[] getPostConstructProgram()

setPostConstructProgram

public void setPostConstructProgram(ConfigProgram[] initProgram)

postConstruct

public void postConstruct(X instance)
Description copied from interface: InjectionTarget
PostConstruct initialization

Specified by:
postConstruct in interface InjectionTarget<X>

preDestroy

public void preDestroy(X instance)
Call pre-destroy

Specified by:
preDestroy in interface InjectionTarget<X>

dispose

public void dispose(X instance)
Description copied from interface: Producer
Dispose the bean.

Specified by:
dispose in interface Producer<X>

toString

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