com.caucho.config.inject
Class DelegateProxyBean

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

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

Marker bean for @Delegate injection


Field Summary
static DelegateProxyBean BEAN
           
 
Constructor Summary
DelegateProxyBean()
           
 
Method Summary
 java.lang.Object create(CreationalContext<java.lang.Object> creationalContext)
          Creates a new instance for the Contextual's type.
 void destroy(java.lang.Object instance, CreationalContext<java.lang.Object> creationalContext)
          Destroys an instance for the Contextual's type.
 java.lang.Class<?> getBeanClass()
          Returns the bean class.
 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 qualifier 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 stereotypes that the bean uses for priority
 java.util.Set<java.lang.reflect.Type> getTypes()
          Returns the types that the bean exports for bindings.
 boolean isAlternative()
          True for a disabled alternative.
 boolean isNullable()
          Returns true if the bean can be null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN

public static final DelegateProxyBean BEAN
Constructor Detail

DelegateProxyBean

public DelegateProxyBean()
Method Detail

getBeanClass

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

Specified by:
getBeanClass in interface Bean<java.lang.Object>

getInjectionPoints

public java.util.Set<InjectionPoint> getInjectionPoints()
Description copied from interface: Bean
Returns the set of injection points, for validation.

Specified by:
getInjectionPoints in interface Bean<java.lang.Object>

getName

public java.lang.String getName()
Description copied from interface: Bean
Returns the bean's name or null if the bean does not have a primary name.

Specified by:
getName in interface Bean<java.lang.Object>

getQualifiers

public java.util.Set<java.lang.annotation.Annotation> getQualifiers()
Description copied from interface: Bean
Returns the bean's qualifier annotations.

Specified by:
getQualifiers in interface Bean<java.lang.Object>

getScope

public java.lang.Class<? extends java.lang.annotation.Annotation> getScope()
Description copied from interface: Bean
Returns the bean's scope type.

Specified by:
getScope in interface Bean<java.lang.Object>

getStereotypes

public java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getStereotypes()
Description copied from interface: Bean
Returns the stereotypes that the bean uses for priority

Specified by:
getStereotypes in interface Bean<java.lang.Object>

getTypes

public java.util.Set<java.lang.reflect.Type> getTypes()
Description copied from interface: Bean
Returns the types that the bean exports for bindings.

Specified by:
getTypes in interface Bean<java.lang.Object>

isAlternative

public boolean isAlternative()
Description copied from interface: Bean
True for a disabled alternative.

Specified by:
isAlternative in interface Bean<java.lang.Object>

isNullable

public boolean isNullable()
Description copied from interface: Bean
Returns true if the bean can be null

Specified by:
isNullable in interface Bean<java.lang.Object>

create

public java.lang.Object create(CreationalContext<java.lang.Object> creationalContext)
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<java.lang.Object>
Parameters:
creationalContext - the creation context used to support circular references.
Returns:
the new instance

destroy

public void destroy(java.lang.Object instance,
                    CreationalContext<java.lang.Object> creationalContext)
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<java.lang.Object>
Parameters:
instance - the instance to destroy