com.caucho.config.inject
Class InjectionPointBean

java.lang.Object
  extended by com.caucho.config.inject.InjectionPointBean
All Implemented Interfaces:
Contextual<InjectionPoint>, Bean<InjectionPoint>

@Module
public class InjectionPointBean
extends java.lang.Object
implements Bean<InjectionPoint>

Configuration for the xml web bean component.


Constructor Summary
InjectionPointBean(BeanManager manager, InjectionPoint ij)
           
 
Method Summary
 InjectionPoint create(CreationalContext<InjectionPoint> env)
          Creates a new instance for the Contextual's type.
 void destroy(InjectionPoint instance, CreationalContext<InjectionPoint> env)
          Destroys an instance for the Contextual's type.
 java.lang.Class<InjectionPoint> getBeanClass()
          Returns the bean class.
 java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
          Returns the bean's deployment type
 java.util.Set<InjectionPoint> getInjectionPoints()
          Returns the set of injection points, for validation.
 java.lang.String getName()
          Returns the bean's name or null if the bean does not have a primary name.
 java.util.Set<java.lang.annotation.Annotation> getQualifiers()
          Returns the bean's binding annotations.
 java.lang.Class<? extends java.lang.annotation.Annotation> getScope()
          Returns the bean's scope type.
 java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getStereotypes()
          Returns the bean's stereotype annotations.
 java.util.Set<java.lang.reflect.Type> getTypes()
          Returns the types that the bean exports for bindings.
 void inject(InjectionPoint instance)
          Inject the bean.
 boolean isAlternative()
          Returns true if the bean can be null
 boolean isNullable()
          Returns true if the bean can be null
 boolean isPassivationCapable()
          Returns true if the bean is serializable
 void postConstruct(InjectionPoint instance)
          Call post-construct
 void preDestroy(InjectionPoint instance)
          Call pre-destroy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectionPointBean

public InjectionPointBean(BeanManager manager,
                          InjectionPoint ij)
Method Detail

getBeanClass

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

Specified by:
getBeanClass in interface Bean<InjectionPoint>

getQualifiers

public java.util.Set<java.lang.annotation.Annotation> getQualifiers()
Returns the bean's binding annotations.

Specified by:
getQualifiers in interface Bean<InjectionPoint>

getStereotypes

public java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getStereotypes()
Returns the bean's stereotype annotations.

Specified by:
getStereotypes in interface Bean<InjectionPoint>

getDeploymentType

public java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
Returns the bean's deployment type


getInjectionPoints

public java.util.Set<InjectionPoint> getInjectionPoints()
Returns the set of injection points, for validation.

Specified by:
getInjectionPoints in interface Bean<InjectionPoint>

getName

public java.lang.String getName()
Returns the bean's name or null if the bean does not have a primary name.

Specified by:
getName in interface Bean<InjectionPoint>

isNullable

public boolean isNullable()
Returns true if the bean can be null

Specified by:
isNullable in interface Bean<InjectionPoint>

isAlternative

public boolean isAlternative()
Returns true if the bean can be null

Specified by:
isAlternative in interface Bean<InjectionPoint>

isPassivationCapable

public boolean isPassivationCapable()
Returns true if the bean is serializable


getScope

public java.lang.Class<? extends java.lang.annotation.Annotation> getScope()
Returns the bean's scope type.

Specified by:
getScope in interface Bean<InjectionPoint>

getTypes

public java.util.Set<java.lang.reflect.Type> getTypes()
Returns the types that the bean exports for bindings.

Specified by:
getTypes in interface Bean<InjectionPoint>

create

public InjectionPoint create(CreationalContext<InjectionPoint> env)
Description copied from interface: Contextual
Creates a new instance for the Contextual's type. If the instance already exists in the CreationalContext, create will return it instead of creating a new instance.
  1. create an instance of the bean
  2. create interceptor and decorator stacks
  3. inject dependencies
  4. set any XML-configured values
  5. call @PostConstruct

Specified by:
create in interface Contextual<InjectionPoint>
Parameters:
env - the creation context used to support circular references.
Returns:
the new instance

inject

public void inject(InjectionPoint instance)
Inject the bean.


postConstruct

public void postConstruct(InjectionPoint instance)
Call post-construct


preDestroy

public void preDestroy(InjectionPoint instance)
Call pre-destroy


destroy

public void destroy(InjectionPoint instance,
                    CreationalContext<InjectionPoint> env)
Description copied from interface: Contextual
Destroys an instance for the Contextual's type.
  1. Call any @Disposal method
  2. Call @PreDestroy methods
  3. Destroy dependent objects

Specified by:
destroy in interface Contextual<InjectionPoint>
Parameters:
instance - the instance to destroy