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

java.lang.Object
  extended by com.caucho.config.inject.AbstractInterceptorBean<X>
      extended by com.caucho.config.inject.InterceptorRuntimeBean<X>
          extended by com.caucho.config.inject.InterceptorSelfBean<X>
All Implemented Interfaces:
Contextual<X>, Bean<X>, Interceptor<X>

public class InterceptorSelfBean<X>
extends InterceptorRuntimeBean<X>

InterceptorBean represents a Java interceptor


Constructor Summary
InterceptorSelfBean(java.lang.Class<X> type)
           
 
Method Summary
 X create(CreationalContext<X> cxt)
          Creates a new instance for the Contextual's type.
 void destroy(X instance, CreationalContext<X> env)
          Destroys a bean instance
 Bean<X> getBean()
           
 
Methods inherited from class com.caucho.config.inject.InterceptorRuntimeBean
equals, getBeanClass, getInjectionPoints, getInterceptorBindings, getMethod, getName, getParent, getQualifiers, getScope, getStereotypes, getType, getTypes, hashCode, intercept, intercepts, isAllowParent, isAlternative, isNullable, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterceptorSelfBean

public InterceptorSelfBean(java.lang.Class<X> type)
Method Detail

getBean

public Bean<X> getBean()
Overrides:
getBean in class InterceptorRuntimeBean<X>

create

public X create(CreationalContext<X> cxt)
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<X>
Overrides:
create in class InterceptorRuntimeBean<X>
Parameters:
cxt - the creation context used to support circular references.
Returns:
the new instance

destroy

public void destroy(X instance,
                    CreationalContext<X> env)
Destroys a bean instance

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