Interface WeldInjectionTargetBuilder<T>


public interface WeldInjectionTargetBuilder<T>
A builder that allows a customized WeldInjectionTarget instance to be created.

By default, the returned WeldInjectionTargetBuilder instance will support:

  • resource injection (e.g. @Resource, @EJB)
  • decorators, as long as bean is set
  • lifecycle and around-invoke interceptors
  • target class lifecycle interceptor callbacks
Each of these capabilities may be disabled by calling a corresponding set*Enabled(false) method.
Author:
Jozef Hartinger
  • Method Details

    • setResourceInjectionEnabled

      WeldInjectionTargetBuilder<T> setResourceInjectionEnabled(boolean value)
      Enables/disables resource injection in the resulting WeldInjectionTargetBuilder. By default, this feature is enabled.
      Parameters:
      value - enables/disables resource injection
      Returns:
      the builder
    • setTargetClassLifecycleCallbacksEnabled

      WeldInjectionTargetBuilder<T> setTargetClassLifecycleCallbacksEnabled(boolean value)
      Enables/disables target class lifecycle callback in the resulting WeldInjectionTargetBuilder. By default, this feature is enabled.
      Parameters:
      value - enables/disables target class lifecycle callback
      Returns:
      the builder
    • setInterceptionEnabled

      WeldInjectionTargetBuilder<T> setInterceptionEnabled(boolean value)
      Enables/disables interception support in the resulting WeldInjectionTargetBuilder. By default, this feature is enabled.
      Parameters:
      value - enables/disables interception support
      Returns:
      the builder
    • setDecorationEnabled

      WeldInjectionTargetBuilder<T> setDecorationEnabled(boolean value)
      Enables/disables decoration support in the resulting WeldInjectionTargetBuilder. By default, this feature is enabled as long as the bean is set.
      Parameters:
      value - enables/disables decoration support
      Returns:
      the builder
    • setBean

      WeldInjectionTargetBuilder<T> setBean(jakarta.enterprise.inject.spi.Bean<T> bean)
      Sets the bean that the resulting WeldInjectionTarget corresponds to. This is an optional attribute of a WeldInjectionTarget and it is ok to leave this unset for any non-contextual component.
      Parameters:
      bean - the specified bean
      Returns:
      the builder
    • build

      Returns a newly-created WeldInjectionTarget based on the contents of this builder.
      Returns:
      newly-created WeldInjectionTarget