Refine search
public static <T> DefaultLifecycleCallbackInvoker<T> of(EnhancedAnnotatedType<T> type) { return new DefaultLifecycleCallbackInvoker<T>(type); }
@Override public void postConstruct(T instance, Instantiator<T> instantiator) { // this may be null for NonProducibleInjectionTarget if (instantiator != null && instantiator.hasInterceptorSupport()) { InterceptionUtils.executePostConstruct(instance); } else { invokeMethods(accessiblePostConstructMethods, instance); } }
@Override public void preDestroy(T instance, Instantiator<T> instantiator) { // this may be null for NonProducibleInjectionTarget if (instantiator != null && instantiator.hasInterceptorSupport()) { InterceptionUtils.executePredestroy(instance); } else { invokeMethods(accessiblePreDestroyMethods, instance); } }
private LifecycleCallbackInvoker<T> buildInvoker() { if (targetClassLifecycleCallbacksEnabled) { return DefaultLifecycleCallbackInvoker.of(type); } else { return NoopLifecycleCallbackInvoker.<T>getInstance(); } }
public static <T> SessionBeanInjectionTarget<T> of(EnhancedAnnotatedType<T> type, SessionBean<T> bean, BeanManagerImpl beanManager) { LifecycleCallbackInvoker<T> invoker = DefaultLifecycleCallbackInvoker.of(type); Injector<T> injector; if (bean.getEjbDescriptor().isStateless() || bean.getEjbDescriptor().isSingleton()) { injector = new DynamicInjectionPointInjector<T>(type, bean, beanManager); } else { injector = new DefaultInjector<T>(type, bean, beanManager); } return new SessionBeanInjectionTarget<T>(type, bean, beanManager, injector, invoker); }
public DefaultLifecycleCallbackInvoker(EnhancedAnnotatedType<T> type) { this.accessiblePostConstructMethods = initMethodList(BeanMethods.getPostConstructMethods(type)); this.accessiblePreDestroyMethods = initMethodList(BeanMethods.getPreDestroyMethods(type)); }
@Override public boolean hasPostConstructCallback() { return hasPostConstructMethods(); } }
@Override public void preDestroy(T instance, Instantiator<T> instantiator) { // this may be null for NonProducibleInjectionTarget if (instantiator != null && instantiator.hasInterceptorSupport()) { InterceptionUtils.executePredestroy(instance); } else { invokeMethods(accessiblePreDestroyMethods, instance); } }
private LifecycleCallbackInvoker<T> buildInvoker() { if (targetClassLifecycleCallbacksEnabled) { return DefaultLifecycleCallbackInvoker.of(type); } else { return NoopLifecycleCallbackInvoker.<T>getInstance(); } }
public static <T> SessionBeanInjectionTarget<T> of(EnhancedAnnotatedType<T> type, SessionBean<T> bean, BeanManagerImpl beanManager) { LifecycleCallbackInvoker<T> invoker = DefaultLifecycleCallbackInvoker.of(type); Injector<T> injector; if (bean.getEjbDescriptor().isStateless() || bean.getEjbDescriptor().isSingleton()) { injector = new DynamicInjectionPointInjector<T>(type, bean, beanManager); } else { injector = new DefaultInjector<T>(type, bean, beanManager); } return new SessionBeanInjectionTarget<T>(type, bean, beanManager, injector, invoker); }
public DefaultLifecycleCallbackInvoker(EnhancedAnnotatedType<T> type) { this.accessiblePostConstructMethods = initMethodList(BeanMethods.getPostConstructMethods(type)); this.accessiblePreDestroyMethods = initMethodList(BeanMethods.getPreDestroyMethods(type)); }
@Override public void postConstruct(T instance, Instantiator<T> instantiator) { // this may be null for NonProducibleInjectionTarget if (instantiator != null && instantiator.hasInterceptorSupport()) { InterceptionUtils.executePostConstruct(instance); } else { invokeMethods(accessiblePostConstructMethods, instance); } }
@Override public void preDestroy(T instance, Instantiator<T> instantiator) { // this may be null for NonProducibleInjectionTarget if (instantiator != null && instantiator.hasInterceptorSupport()) { InterceptionUtils.executePredestroy(instance); } else { invokeMethods(accessiblePreDestroyMethods, instance); } }
private LifecycleCallbackInvoker<T> buildInvoker() { if (targetClassLifecycleCallbacksEnabled) { return DefaultLifecycleCallbackInvoker.of(type); } else { return NoopLifecycleCallbackInvoker.<T>getInstance(); } }
public DefaultLifecycleCallbackInvoker(EnhancedAnnotatedType<T> type) { this.accessiblePostConstructMethods = initMethodList(BeanMethods.getPostConstructMethods(type)); this.accessiblePreDestroyMethods = initMethodList(BeanMethods.getPreDestroyMethods(type)); }
public static <T> DefaultLifecycleCallbackInvoker<T> of(EnhancedAnnotatedType<T> type) { return new DefaultLifecycleCallbackInvoker<T>(type); }
@Override public void postConstruct(T instance, Instantiator<T> instantiator) { // this may be null for NonProducibleInjectionTarget if (instantiator != null && instantiator.hasInterceptorSupport()) { InterceptionUtils.executePostConstruct(instance); } else { invokeMethods(accessiblePostConstructMethods, instance); } }