Package org.jboss.weld.manager.api
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
- Author:
- Jozef Hartinger
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newly-createdWeldInjectionTargetbased on the contents of this builder.Sets the bean that the resultingWeldInjectionTargetcorresponds to.setDecorationEnabled(boolean value) Enables/disables decoration support in the resultingWeldInjectionTargetBuilder.setInterceptionEnabled(boolean value) Enables/disables interception support in the resultingWeldInjectionTargetBuilder.setResourceInjectionEnabled(boolean value) Enables/disables resource injection in the resultingWeldInjectionTargetBuilder.setTargetClassLifecycleCallbacksEnabled(boolean value) Enables/disables target class lifecycle callback in the resultingWeldInjectionTargetBuilder.
-
Method Details
-
setResourceInjectionEnabled
Enables/disables resource injection in the resultingWeldInjectionTargetBuilder. By default, this feature is enabled.- Parameters:
value- enables/disables resource injection- Returns:
- the builder
-
setTargetClassLifecycleCallbacksEnabled
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
Enables/disables interception support in the resultingWeldInjectionTargetBuilder. By default, this feature is enabled.- Parameters:
value- enables/disables interception support- Returns:
- the builder
-
setDecorationEnabled
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
Sets the bean that the resultingWeldInjectionTargetcorresponds to. This is an optional attribute of aWeldInjectionTargetand 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-createdWeldInjectionTargetbased on the contents of this builder.- Returns:
- newly-created
WeldInjectionTarget
-