Package org.jboss.weld.manager.api
Interface WeldInjectionTargetBuilder<T>
-
public interface WeldInjectionTargetBuilder<T>
A builder that allows a customizedWeldInjectionTarget
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
- Author:
- Jozef Hartinger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WeldInjectionTarget<T>
build()
Returns a newly-createdWeldInjectionTarget
based on the contents of this builder.WeldInjectionTargetBuilder<T>
setBean(jakarta.enterprise.inject.spi.Bean<T> bean)
Sets the bean that the resultingWeldInjectionTarget
corresponds to.WeldInjectionTargetBuilder<T>
setDecorationEnabled(boolean value)
Enables/disables decoration support in the resultingWeldInjectionTargetBuilder
.WeldInjectionTargetBuilder<T>
setInterceptionEnabled(boolean value)
Enables/disables interception support in the resultingWeldInjectionTargetBuilder
.WeldInjectionTargetBuilder<T>
setResourceInjectionEnabled(boolean value)
Enables/disables resource injection in the resultingWeldInjectionTargetBuilder
.WeldInjectionTargetBuilder<T>
setTargetClassLifecycleCallbacksEnabled(boolean value)
Enables/disables target class lifecycle callback in the resultingWeldInjectionTargetBuilder
.
-
-
-
Method Detail
-
setResourceInjectionEnabled
WeldInjectionTargetBuilder<T> setResourceInjectionEnabled(boolean value)
Enables/disables resource injection in the resultingWeldInjectionTargetBuilder
. 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 resultingWeldInjectionTargetBuilder
. 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 resultingWeldInjectionTargetBuilder
. 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 resultingWeldInjectionTargetBuilder
. 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 resultingWeldInjectionTarget
corresponds to. This is an optional attribute of aWeldInjectionTarget
and it is ok to leave this unset for any non-contextual component.- Parameters:
bean
- the specified bean- Returns:
- the builder
-
build
WeldInjectionTarget<T> build()
Returns a newly-createdWeldInjectionTarget
based on the contents of this builder.- Returns:
- newly-created
WeldInjectionTarget
-
-